1. Packages
  2. OVH
  3. API Docs
  4. IpLoadBalancing
  5. UdpFarmServer
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.IpLoadBalancing.UdpFarmServer

Explore with Pulumi AI

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",
});
Copy
import pulumi
import pulumi_ovh as ovh

lb = ovh.IpLoadBalancing.get_ip_load_balancing(service_name="ip-1.2.3.4",
    state="ok")
farm_name = 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=farm_name.farm_id,
    port=80,
    service_name=lb.service_name,
    status="active")
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/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
	})
}
Copy
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",
    });

});
Copy
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.ovhcloud.pulumi.ovh.IpLoadBalancing.UdpFarm;
import com.ovhcloud.pulumi.ovh.IpLoadBalancing.UdpFarmArgs;
import com.ovhcloud.pulumi.ovh.IpLoadBalancing.UdpFarmServer;
import com.ovhcloud.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.0)
            .serviceName(lb.serviceName())
            .zone("gra")
            .build());

        var backend = new UdpFarmServer("backend", UdpFarmServerArgs.builder()
            .address("4.5.6.7")
            .displayName("mybackend")
            .farmId(farmName.farmId())
            .port(80.0)
            .serviceName(lb.serviceName())
            .status("active")
            .build());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. UdpFarmServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. UdpFarmServerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UdpFarmServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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,
});
Copy
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),
})
Copy
var udpFarmServerResource = new UdpFarmServer("udpFarmServerResource", UdpFarmServerArgs.builder()
    .address("string")
    .farmId(0)
    .serviceName("string")
    .status("string")
    .displayName("string")
    .port(0)
    .build());
Copy
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)
Copy
const udpFarmServerResource = new ovh.iploadbalancing.UdpFarmServer("udpFarmServerResource", {
    address: "string",
    farmId: 0,
    serviceName: "string",
    status: "string",
    displayName: "string",
    port: 0,
});
Copy
type: ovh:IpLoadBalancing:UdpFarmServer
properties:
    address: string
    displayName: string
    farmId: 0
    port: 0
    serviceName: string
    status: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The UdpFarmServer resource accepts the following input properties:

Address This property is required. string
Address of the backend server (IP from either internal or OVHcloud network)
FarmId This property is required. double
ID of the farm this server is attached to
ServiceName This property is required. string
The internal name of your IP load balancing
Status This property is required. string
backend status - active or inactive
DisplayName string
Label for the server
Port double
Port that backend will respond on
Address This property is required. string
Address of the backend server (IP from either internal or OVHcloud network)
FarmId This property is required. float64
ID of the farm this server is attached to
ServiceName This property is required. string
The internal name of your IP load balancing
Status This property is required. string
backend status - active or inactive
DisplayName string
Label for the server
Port float64
Port that backend will respond on
address This property is required. String
Address of the backend server (IP from either internal or OVHcloud network)
farmId This property is required. Double
ID of the farm this server is attached to
serviceName This property is required. String
The internal name of your IP load balancing
status This property is required. String
backend status - active or inactive
displayName String
Label for the server
port Double
Port that backend will respond on
address This property is required. string
Address of the backend server (IP from either internal or OVHcloud network)
farmId This property is required. number
ID of the farm this server is attached to
serviceName This property is required. string
The internal name of your IP load balancing
status This property is required. string
backend status - active or inactive
displayName string
Label for the server
port number
Port that backend will respond on
address This property is required. str
Address of the backend server (IP from either internal or OVHcloud network)
farm_id This property is required. float
ID of the farm this server is attached to
service_name This property is required. str
The internal name of your IP load balancing
status This property is required. str
backend status - active or inactive
display_name str
Label for the server
port float
Port that backend will respond on
address This property is required. String
Address of the backend server (IP from either internal or OVHcloud network)
farmId This property is required. Number
ID of the farm this server is attached to
serviceName This property is required. String
The internal name of your IP load balancing
status This property is required. 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)
resources:  _:    type: ovh:IpLoadBalancing:UdpFarmServer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.

bash

$ pulumi import ovh:IpLoadBalancing/udpFarmServer:UdpFarmServer backend service_name/farm_id/server_id
Copy

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.