1. Packages
  2. OVH
  3. API Docs
  4. IpLoadBalancing
  5. UdpFarmServer
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

ovh.IpLoadBalancing.UdpFarmServer

Explore with Pulumi AI

ovh logo
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

    Creates a backend server entry linked to loadbalancing group (farm)

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    import * as ovh from "@pulumi/ovh";
    
    const lb = ovh.IpLoadBalancing.getIpLoadBalancing({
        serviceName: "ip-1.2.3.4",
        state: "ok",
    });
    const farmname = new ovh.iploadbalancing.UdpFarm("farmname", {
        displayName: "ingress-8080-gra",
        port: 80,
        serviceName: lb.then(lb => lb.serviceName),
        zone: "gra",
    });
    const backend = new ovh.iploadbalancing.UdpFarmServer("backend", {
        address: "4.5.6.7",
        displayName: "mybackend",
        farmId: farmname.farmId,
        port: 80,
        serviceName: lb.then(lb => lb.serviceName),
        status: "active",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    lb = ovh.IpLoadBalancing.get_ip_load_balancing(service_name="ip-1.2.3.4",
        state="ok")
    farmname = ovh.ip_load_balancing.UdpFarm("farmname",
        display_name="ingress-8080-gra",
        port=80,
        service_name=lb.service_name,
        zone="gra")
    backend = ovh.ip_load_balancing.UdpFarmServer("backend",
        address="4.5.6.7",
        display_name="mybackend",
        farm_id=farmname.farm_id,
        port=80,
        service_name=lb.service_name,
        status="active")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/IpLoadBalancing"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		lb, err := IpLoadBalancing.GetIpLoadBalancing(ctx, &iploadbalancing.GetIpLoadBalancingArgs{
    			ServiceName: pulumi.StringRef("ip-1.2.3.4"),
    			State:       pulumi.StringRef("ok"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		farmname, err := IpLoadBalancing.NewUdpFarm(ctx, "farmname", &IpLoadBalancing.UdpFarmArgs{
    			DisplayName: pulumi.String("ingress-8080-gra"),
    			Port:        pulumi.Float64(80),
    			ServiceName: pulumi.String(lb.ServiceName),
    			Zone:        pulumi.String("gra"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = IpLoadBalancing.NewUdpFarmServer(ctx, "backend", &IpLoadBalancing.UdpFarmServerArgs{
    			Address:     pulumi.String("4.5.6.7"),
    			DisplayName: pulumi.String("mybackend"),
    			FarmId:      farmname.FarmId,
    			Port:        pulumi.Float64(80),
    			ServiceName: pulumi.String(lb.ServiceName),
    			Status:      pulumi.String("active"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var lb = Ovh.IpLoadBalancing.GetIpLoadBalancing.Invoke(new()
        {
            ServiceName = "ip-1.2.3.4",
            State = "ok",
        });
    
        var farmname = new Ovh.IpLoadBalancing.UdpFarm("farmname", new()
        {
            DisplayName = "ingress-8080-gra",
            Port = 80,
            ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.ServiceName),
            Zone = "gra",
        });
    
        var backend = new Ovh.IpLoadBalancing.UdpFarmServer("backend", new()
        {
            Address = "4.5.6.7",
            DisplayName = "mybackend",
            FarmId = farmname.FarmId,
            Port = 80,
            ServiceName = lb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.ServiceName),
            Status = "active",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.IpLoadBalancing.IpLoadBalancingFunctions;
    import com.pulumi.ovh.IpLoadBalancing.inputs.GetIpLoadBalancingArgs;
    import com.pulumi.ovh.IpLoadBalancing.UdpFarm;
    import com.pulumi.ovh.IpLoadBalancing.UdpFarmArgs;
    import com.pulumi.ovh.IpLoadBalancing.UdpFarmServer;
    import com.pulumi.ovh.IpLoadBalancing.UdpFarmServerArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var lb = IpLoadBalancingFunctions.getIpLoadBalancing(GetIpLoadBalancingArgs.builder()
                .serviceName("ip-1.2.3.4")
                .state("ok")
                .build());
    
            var farmname = new UdpFarm("farmname", UdpFarmArgs.builder()
                .displayName("ingress-8080-gra")
                .port(80)
                .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
                .zone("gra")
                .build());
    
            var backend = new UdpFarmServer("backend", UdpFarmServerArgs.builder()
                .address("4.5.6.7")
                .displayName("mybackend")
                .farmId(farmname.farmId())
                .port(80)
                .serviceName(lb.applyValue(getIpLoadBalancingResult -> getIpLoadBalancingResult.serviceName()))
                .status("active")
                .build());
    
        }
    }
    
    resources:
      farmname:
        type: ovh:IpLoadBalancing:UdpFarm
        properties:
          displayName: ingress-8080-gra
          port: 80
          serviceName: ${lb.serviceName}
          zone: gra
      backend:
        type: ovh:IpLoadBalancing:UdpFarmServer
        properties:
          address: 4.5.6.7
          displayName: mybackend
          farmId: ${farmname.farmId}
          port: 80
          serviceName: ${lb.serviceName}
          status: active
    variables:
      lb:
        fn::invoke:
          Function: ovh:IpLoadBalancing:getIpLoadBalancing
          Arguments:
            serviceName: ip-1.2.3.4
            state: ok
    

    Create UdpFarmServer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new UdpFarmServer(name: string, args: UdpFarmServerArgs, opts?: CustomResourceOptions);
    @overload
    def UdpFarmServer(resource_name: str,
                      args: UdpFarmServerArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def UdpFarmServer(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      address: Optional[str] = None,
                      farm_id: Optional[float] = None,
                      service_name: Optional[str] = None,
                      status: Optional[str] = None,
                      display_name: Optional[str] = None,
                      port: Optional[float] = None)
    func NewUdpFarmServer(ctx *Context, name string, args UdpFarmServerArgs, opts ...ResourceOption) (*UdpFarmServer, error)
    public UdpFarmServer(string name, UdpFarmServerArgs args, CustomResourceOptions? opts = null)
    public UdpFarmServer(String name, UdpFarmServerArgs args)
    public UdpFarmServer(String name, UdpFarmServerArgs args, CustomResourceOptions options)
    
    type: ovh:IpLoadBalancing:UdpFarmServer
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args UdpFarmServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UdpFarmServerArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UdpFarmServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UdpFarmServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UdpFarmServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var udpFarmServerResource = new Ovh.IpLoadBalancing.UdpFarmServer("udpFarmServerResource", new()
    {
        Address = "string",
        FarmId = 0,
        ServiceName = "string",
        Status = "string",
        DisplayName = "string",
        Port = 0,
    });
    
    example, err := IpLoadBalancing.NewUdpFarmServer(ctx, "udpFarmServerResource", &IpLoadBalancing.UdpFarmServerArgs{
    	Address:     pulumi.String("string"),
    	FarmId:      pulumi.Float64(0),
    	ServiceName: pulumi.String("string"),
    	Status:      pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	Port:        pulumi.Float64(0),
    })
    
    var udpFarmServerResource = new UdpFarmServer("udpFarmServerResource", UdpFarmServerArgs.builder()
        .address("string")
        .farmId(0)
        .serviceName("string")
        .status("string")
        .displayName("string")
        .port(0)
        .build());
    
    udp_farm_server_resource = ovh.ip_load_balancing.UdpFarmServer("udpFarmServerResource",
        address="string",
        farm_id=0,
        service_name="string",
        status="string",
        display_name="string",
        port=0)
    
    const udpFarmServerResource = new ovh.iploadbalancing.UdpFarmServer("udpFarmServerResource", {
        address: "string",
        farmId: 0,
        serviceName: "string",
        status: "string",
        displayName: "string",
        port: 0,
    });
    
    type: ovh:IpLoadBalancing:UdpFarmServer
    properties:
        address: string
        displayName: string
        farmId: 0
        port: 0
        serviceName: string
        status: string
    

    UdpFarmServer Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The UdpFarmServer resource accepts the following input properties:

    Address string
    Address of the backend server (IP from either internal or OVHcloud network)
    FarmId double
    ID of the farm this server is attached to
    ServiceName string
    The internal name of your IP load balancing
    Status string
    backend status - active or inactive
    DisplayName string
    Label for the server
    Port double
    Port that backend will respond on
    Address string
    Address of the backend server (IP from either internal or OVHcloud network)
    FarmId float64
    ID of the farm this server is attached to
    ServiceName string
    The internal name of your IP load balancing
    Status string
    backend status - active or inactive
    DisplayName string
    Label for the server
    Port float64
    Port that backend will respond on
    address String
    Address of the backend server (IP from either internal or OVHcloud network)
    farmId Double
    ID of the farm this server is attached to
    serviceName String
    The internal name of your IP load balancing
    status String
    backend status - active or inactive
    displayName String
    Label for the server
    port Double
    Port that backend will respond on
    address string
    Address of the backend server (IP from either internal or OVHcloud network)
    farmId number
    ID of the farm this server is attached to
    serviceName string
    The internal name of your IP load balancing
    status string
    backend status - active or inactive
    displayName string
    Label for the server
    port number
    Port that backend will respond on
    address str
    Address of the backend server (IP from either internal or OVHcloud network)
    farm_id float
    ID of the farm this server is attached to
    service_name str
    The internal name of your IP load balancing
    status str
    backend status - active or inactive
    display_name str
    Label for the server
    port float
    Port that backend will respond on
    address String
    Address of the backend server (IP from either internal or OVHcloud network)
    farmId Number
    ID of the farm this server is attached to
    serviceName String
    The internal name of your IP load balancing
    status String
    backend status - active or inactive
    displayName String
    Label for the server
    port Number
    Port that backend will respond on

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UdpFarmServer resource produces the following output properties:

    BackendId double
    Synonym for farm_id.
    Id string
    The provider-assigned unique ID for this managed resource.
    ServerId double
    Id of your server.
    BackendId float64
    Synonym for farm_id.
    Id string
    The provider-assigned unique ID for this managed resource.
    ServerId float64
    Id of your server.
    backendId Double
    Synonym for farm_id.
    id String
    The provider-assigned unique ID for this managed resource.
    serverId Double
    Id of your server.
    backendId number
    Synonym for farm_id.
    id string
    The provider-assigned unique ID for this managed resource.
    serverId number
    Id of your server.
    backend_id float
    Synonym for farm_id.
    id str
    The provider-assigned unique ID for this managed resource.
    server_id float
    Id of your server.
    backendId Number
    Synonym for farm_id.
    id String
    The provider-assigned unique ID for this managed resource.
    serverId Number
    Id of your server.

    Look up Existing UdpFarmServer Resource

    Get an existing UdpFarmServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: UdpFarmServerState, opts?: CustomResourceOptions): UdpFarmServer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            backend_id: Optional[float] = None,
            display_name: Optional[str] = None,
            farm_id: Optional[float] = None,
            port: Optional[float] = None,
            server_id: Optional[float] = None,
            service_name: Optional[str] = None,
            status: Optional[str] = None) -> UdpFarmServer
    func GetUdpFarmServer(ctx *Context, name string, id IDInput, state *UdpFarmServerState, opts ...ResourceOption) (*UdpFarmServer, error)
    public static UdpFarmServer Get(string name, Input<string> id, UdpFarmServerState? state, CustomResourceOptions? opts = null)
    public static UdpFarmServer get(String name, Output<String> id, UdpFarmServerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Address string
    Address of the backend server (IP from either internal or OVHcloud network)
    BackendId double
    Synonym for farm_id.
    DisplayName string
    Label for the server
    FarmId double
    ID of the farm this server is attached to
    Port double
    Port that backend will respond on
    ServerId double
    Id of your server.
    ServiceName string
    The internal name of your IP load balancing
    Status string
    backend status - active or inactive
    Address string
    Address of the backend server (IP from either internal or OVHcloud network)
    BackendId float64
    Synonym for farm_id.
    DisplayName string
    Label for the server
    FarmId float64
    ID of the farm this server is attached to
    Port float64
    Port that backend will respond on
    ServerId float64
    Id of your server.
    ServiceName string
    The internal name of your IP load balancing
    Status string
    backend status - active or inactive
    address String
    Address of the backend server (IP from either internal or OVHcloud network)
    backendId Double
    Synonym for farm_id.
    displayName String
    Label for the server
    farmId Double
    ID of the farm this server is attached to
    port Double
    Port that backend will respond on
    serverId Double
    Id of your server.
    serviceName String
    The internal name of your IP load balancing
    status String
    backend status - active or inactive
    address string
    Address of the backend server (IP from either internal or OVHcloud network)
    backendId number
    Synonym for farm_id.
    displayName string
    Label for the server
    farmId number
    ID of the farm this server is attached to
    port number
    Port that backend will respond on
    serverId number
    Id of your server.
    serviceName string
    The internal name of your IP load balancing
    status string
    backend status - active or inactive
    address str
    Address of the backend server (IP from either internal or OVHcloud network)
    backend_id float
    Synonym for farm_id.
    display_name str
    Label for the server
    farm_id float
    ID of the farm this server is attached to
    port float
    Port that backend will respond on
    server_id float
    Id of your server.
    service_name str
    The internal name of your IP load balancing
    status str
    backend status - active or inactive
    address String
    Address of the backend server (IP from either internal or OVHcloud network)
    backendId Number
    Synonym for farm_id.
    displayName String
    Label for the server
    farmId Number
    ID of the farm this server is attached to
    port Number
    Port that backend will respond on
    serverId Number
    Id of your server.
    serviceName String
    The internal name of your IP load balancing
    status String
    backend status - active or inactive

    Import

    UDP farm server can be imported using the following format service_name, the id of the farm and the id of the server separated by “/” e.g.

    $ terraform import ovh_iploadbalancing_udp_farm_server.backend service_name/farm_id/server_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud