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

ovh.IpLoadBalancing.UdpFarm

Explore with Pulumi AI

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

    Creates a backend server group (farm) to be used by loadbalancing frontend(s)

    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",
    });
    
    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")
    
    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
    		}
    		_, 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
    		}
    		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",
        });
    
    });
    
    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 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());
    
        }
    }
    
    resources:
      farmname:
        type: ovh:IpLoadBalancing:UdpFarm
        properties:
          displayName: ingress-8080-gra
          port: 80
          serviceName: ${lb.serviceName}
          zone: gra
    variables:
      lb:
        fn::invoke:
          Function: ovh:IpLoadBalancing:getIpLoadBalancing
          Arguments:
            serviceName: ip-1.2.3.4
            state: ok
    

    Create UdpFarm Resource

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

    Constructor syntax

    new UdpFarm(name: string, args: UdpFarmArgs, opts?: CustomResourceOptions);
    @overload
    def UdpFarm(resource_name: str,
                args: UdpFarmArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def UdpFarm(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                port: Optional[float] = None,
                service_name: Optional[str] = None,
                zone: Optional[str] = None,
                display_name: Optional[str] = None,
                vrack_network_id: Optional[float] = None)
    func NewUdpFarm(ctx *Context, name string, args UdpFarmArgs, opts ...ResourceOption) (*UdpFarm, error)
    public UdpFarm(string name, UdpFarmArgs args, CustomResourceOptions? opts = null)
    public UdpFarm(String name, UdpFarmArgs args)
    public UdpFarm(String name, UdpFarmArgs args, CustomResourceOptions options)
    
    type: ovh:IpLoadBalancing:UdpFarm
    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 UdpFarmArgs
    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 UdpFarmArgs
    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 UdpFarmArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UdpFarmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UdpFarmArgs
    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 udpFarmResource = new Ovh.IpLoadBalancing.UdpFarm("udpFarmResource", new()
    {
        Port = 0,
        ServiceName = "string",
        Zone = "string",
        DisplayName = "string",
        VrackNetworkId = 0,
    });
    
    example, err := IpLoadBalancing.NewUdpFarm(ctx, "udpFarmResource", &IpLoadBalancing.UdpFarmArgs{
    	Port:           pulumi.Float64(0),
    	ServiceName:    pulumi.String("string"),
    	Zone:           pulumi.String("string"),
    	DisplayName:    pulumi.String("string"),
    	VrackNetworkId: pulumi.Float64(0),
    })
    
    var udpFarmResource = new UdpFarm("udpFarmResource", UdpFarmArgs.builder()
        .port(0)
        .serviceName("string")
        .zone("string")
        .displayName("string")
        .vrackNetworkId(0)
        .build());
    
    udp_farm_resource = ovh.ip_load_balancing.UdpFarm("udpFarmResource",
        port=0,
        service_name="string",
        zone="string",
        display_name="string",
        vrack_network_id=0)
    
    const udpFarmResource = new ovh.iploadbalancing.UdpFarm("udpFarmResource", {
        port: 0,
        serviceName: "string",
        zone: "string",
        displayName: "string",
        vrackNetworkId: 0,
    });
    
    type: ovh:IpLoadBalancing:UdpFarm
    properties:
        displayName: string
        port: 0
        serviceName: string
        vrackNetworkId: 0
        zone: string
    

    UdpFarm 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 UdpFarm resource accepts the following input properties:

    Port double
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    ServiceName string
    The internal name of your IP load balancing
    Zone string
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    DisplayName string
    Readable label for loadbalancer farm
    VrackNetworkId double
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    Port float64
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    ServiceName string
    The internal name of your IP load balancing
    Zone string
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    DisplayName string
    Readable label for loadbalancer farm
    VrackNetworkId float64
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    port Double
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    serviceName String
    The internal name of your IP load balancing
    zone String
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    displayName String
    Readable label for loadbalancer farm
    vrackNetworkId Double
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    port number
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    serviceName string
    The internal name of your IP load balancing
    zone string
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    displayName string
    Readable label for loadbalancer farm
    vrackNetworkId number
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    port float
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    service_name str
    The internal name of your IP load balancing
    zone str
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    display_name str
    Readable label for loadbalancer farm
    vrack_network_id float
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    port Number
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    serviceName String
    The internal name of your IP load balancing
    zone String
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    displayName String
    Readable label for loadbalancer farm
    vrackNetworkId Number
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack

    Outputs

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

    FarmId double
    Id of your farm.
    Id string
    The provider-assigned unique ID for this managed resource.
    FarmId float64
    Id of your farm.
    Id string
    The provider-assigned unique ID for this managed resource.
    farmId Double
    Id of your farm.
    id String
    The provider-assigned unique ID for this managed resource.
    farmId number
    Id of your farm.
    id string
    The provider-assigned unique ID for this managed resource.
    farm_id float
    Id of your farm.
    id str
    The provider-assigned unique ID for this managed resource.
    farmId Number
    Id of your farm.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing UdpFarm Resource

    Get an existing UdpFarm 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?: UdpFarmState, opts?: CustomResourceOptions): UdpFarm
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            farm_id: Optional[float] = None,
            port: Optional[float] = None,
            service_name: Optional[str] = None,
            vrack_network_id: Optional[float] = None,
            zone: Optional[str] = None) -> UdpFarm
    func GetUdpFarm(ctx *Context, name string, id IDInput, state *UdpFarmState, opts ...ResourceOption) (*UdpFarm, error)
    public static UdpFarm Get(string name, Input<string> id, UdpFarmState? state, CustomResourceOptions? opts = null)
    public static UdpFarm get(String name, Output<String> id, UdpFarmState 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:
    DisplayName string
    Readable label for loadbalancer farm
    FarmId double
    Id of your farm.
    Port double
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    ServiceName string
    The internal name of your IP load balancing
    VrackNetworkId double
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    Zone string
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    DisplayName string
    Readable label for loadbalancer farm
    FarmId float64
    Id of your farm.
    Port float64
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    ServiceName string
    The internal name of your IP load balancing
    VrackNetworkId float64
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    Zone string
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    displayName String
    Readable label for loadbalancer farm
    farmId Double
    Id of your farm.
    port Double
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    serviceName String
    The internal name of your IP load balancing
    vrackNetworkId Double
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    zone String
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    displayName string
    Readable label for loadbalancer farm
    farmId number
    Id of your farm.
    port number
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    serviceName string
    The internal name of your IP load balancing
    vrackNetworkId number
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    zone string
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    display_name str
    Readable label for loadbalancer farm
    farm_id float
    Id of your farm.
    port float
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    service_name str
    The internal name of your IP load balancing
    vrack_network_id float
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    zone str
    Zone where the farm will be defined (ie. gra, bhs also supports all)
    displayName String
    Readable label for loadbalancer farm
    farmId Number
    Id of your farm.
    port Number
    Port attached to your farm ([1..49151]). Inherited from frontend if null
    serviceName String
    The internal name of your IP load balancing
    vrackNetworkId Number
    Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
    zone String
    Zone where the farm will be defined (ie. gra, bhs also supports all)

    Import

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

    bash

    $ pulumi import ovh:IpLoadBalancing/udpFarm:UdpFarm farmname service_name/farm_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