1. Packages
  2. OVH
  3. API Docs
  4. IpLoadBalancing
  5. VrackNetwork
OVHCloud v2.2.3 published on Friday, Jun 6, 2025 by OVHcloud

ovh.IpLoadBalancing.VrackNetwork

Explore with Pulumi AI

ovh logo
OVHCloud v2.2.3 published on Friday, Jun 6, 2025 by OVHcloud

    Manage a vrack network for your IP Loadbalancing service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const iplb = ovh.IpLoadBalancing.getIpLoadBalancing({
        serviceName: "loadbalancer-xxxxxxxxxxxxxxxxxx",
    });
    const vipLb = new ovh.vrack.IpLoadbalancing("vip_lb", {
        serviceName: "xxx",
        LoadbalancingId: iplb.then(iplb => iplb.serviceName),
    });
    const network = new ovh.iploadbalancing.VrackNetwork("network", {
        serviceName: vipLb.LoadbalancingId,
        subnet: "10.0.0.0/16",
        vlan: 1,
        natIp: "10.0.0.0/27",
        displayName: "mynetwork",
    });
    const testFarm = new ovh.iploadbalancing.TcpFarm("test_farm", {
        serviceName: network.serviceName,
        displayName: "mytcpbackends",
        port: 80,
        vrackNetworkId: network.vrackNetworkId,
        zone: iplb.then(iplb => iplb.zones?.[0]),
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    iplb = ovh.IpLoadBalancing.get_ip_load_balancing(service_name="loadbalancer-xxxxxxxxxxxxxxxxxx")
    vip_lb = ovh.vrack.IpLoadbalancing("vip_lb",
        service_name="xxx",
        loadbalancing_id=iplb.service_name)
    network = ovh.ip_load_balancing.VrackNetwork("network",
        service_name=vip_lb.loadbalancing_id,
        subnet="10.0.0.0/16",
        vlan=1,
        nat_ip="10.0.0.0/27",
        display_name="mynetwork")
    test_farm = ovh.ip_load_balancing.TcpFarm("test_farm",
        service_name=network.service_name,
        display_name="mytcpbackends",
        port=80,
        vrack_network_id=network.vrack_network_id,
        zone=iplb.zones[0])
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/iploadbalancing"
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/vrack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		iplb, err := iploadbalancing.GetIpLoadBalancing(ctx, &iploadbalancing.GetIpLoadBalancingArgs{
    			ServiceName: pulumi.StringRef("loadbalancer-xxxxxxxxxxxxxxxxxx"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vipLb, err := vrack.NewIpLoadbalancing(ctx, "vip_lb", &vrack.IpLoadbalancingArgs{
    			ServiceName:     pulumi.String("xxx"),
    			LoadbalancingId: pulumi.String(iplb.ServiceName),
    		})
    		if err != nil {
    			return err
    		}
    		network, err := iploadbalancing.NewVrackNetwork(ctx, "network", &iploadbalancing.VrackNetworkArgs{
    			ServiceName: vipLb.LoadbalancingId,
    			Subnet:      pulumi.String("10.0.0.0/16"),
    			Vlan:        pulumi.Int(1),
    			NatIp:       pulumi.String("10.0.0.0/27"),
    			DisplayName: pulumi.String("mynetwork"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = iploadbalancing.NewTcpFarm(ctx, "test_farm", &iploadbalancing.TcpFarmArgs{
    			ServiceName:    network.ServiceName,
    			DisplayName:    pulumi.String("mytcpbackends"),
    			Port:           pulumi.Int(80),
    			VrackNetworkId: network.VrackNetworkId,
    			Zone:           pulumi.String(iplb.Zones[0]),
    		})
    		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 iplb = Ovh.IpLoadBalancing.GetIpLoadBalancing.Invoke(new()
        {
            ServiceName = "loadbalancer-xxxxxxxxxxxxxxxxxx",
        });
    
        var vipLb = new Ovh.Vrack.IpLoadbalancing("vip_lb", new()
        {
            ServiceName = "xxx",
            LoadbalancingId = iplb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.ServiceName),
        });
    
        var network = new Ovh.IpLoadBalancing.VrackNetwork("network", new()
        {
            ServiceName = vipLb.LoadbalancingId,
            Subnet = "10.0.0.0/16",
            Vlan = 1,
            NatIp = "10.0.0.0/27",
            DisplayName = "mynetwork",
        });
    
        var testFarm = new Ovh.IpLoadBalancing.TcpFarm("test_farm", new()
        {
            ServiceName = network.ServiceName,
            DisplayName = "mytcpbackends",
            Port = 80,
            VrackNetworkId = network.VrackNetworkId,
            Zone = iplb.Apply(getIpLoadBalancingResult => getIpLoadBalancingResult.Zones[0]),
        });
    
    });
    
    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.Vrack.IpLoadbalancing;
    import com.ovhcloud.pulumi.ovh.Vrack.IpLoadbalancingArgs;
    import com.ovhcloud.pulumi.ovh.IpLoadBalancing.VrackNetwork;
    import com.ovhcloud.pulumi.ovh.IpLoadBalancing.VrackNetworkArgs;
    import com.ovhcloud.pulumi.ovh.IpLoadBalancing.TcpFarm;
    import com.ovhcloud.pulumi.ovh.IpLoadBalancing.TcpFarmArgs;
    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 iplb = IpLoadBalancingFunctions.getIpLoadBalancing(GetIpLoadBalancingArgs.builder()
                .serviceName("loadbalancer-xxxxxxxxxxxxxxxxxx")
                .build());
    
            var vipLb = new IpLoadbalancing("vipLb", IpLoadbalancingArgs.builder()
                .serviceName("xxx")
                .LoadbalancingId(iplb.serviceName())
                .build());
    
            var network = new VrackNetwork("network", VrackNetworkArgs.builder()
                .serviceName(vipLb.LoadbalancingId())
                .subnet("10.0.0.0/16")
                .vlan(1)
                .natIp("10.0.0.0/27")
                .displayName("mynetwork")
                .build());
    
            var testFarm = new TcpFarm("testFarm", TcpFarmArgs.builder()
                .serviceName(network.serviceName())
                .displayName("mytcpbackends")
                .port(80)
                .vrackNetworkId(network.vrackNetworkId())
                .zone(iplb.zones()[0])
                .build());
    
        }
    }
    
    resources:
      vipLb:
        type: ovh:Vrack:IpLoadbalancing
        name: vip_lb
        properties:
          serviceName: xxx
          LoadbalancingId: ${iplb.serviceName}
      network:
        type: ovh:IpLoadBalancing:VrackNetwork
        properties:
          serviceName: ${vipLb.LoadbalancingId}
          subnet: 10.0.0.0/16
          vlan: 1
          natIp: 10.0.0.0/27
          displayName: mynetwork
      testFarm:
        type: ovh:IpLoadBalancing:TcpFarm
        name: test_farm
        properties:
          serviceName: ${network.serviceName}
          displayName: mytcpbackends
          port: 80
          vrackNetworkId: ${network.vrackNetworkId}
          zone: ${iplb.zones[0]}
    variables:
      iplb:
        fn::invoke:
          function: ovh:IpLoadBalancing:getIpLoadBalancing
          arguments:
            serviceName: loadbalancer-xxxxxxxxxxxxxxxxxx
    

    Create VrackNetwork Resource

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

    Constructor syntax

    new VrackNetwork(name: string, args: VrackNetworkArgs, opts?: CustomResourceOptions);
    @overload
    def VrackNetwork(resource_name: str,
                     args: VrackNetworkArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def VrackNetwork(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     nat_ip: Optional[str] = None,
                     service_name: Optional[str] = None,
                     subnet: Optional[str] = None,
                     display_name: Optional[str] = None,
                     farm_ids: Optional[Sequence[int]] = None,
                     vlan: Optional[int] = None)
    func NewVrackNetwork(ctx *Context, name string, args VrackNetworkArgs, opts ...ResourceOption) (*VrackNetwork, error)
    public VrackNetwork(string name, VrackNetworkArgs args, CustomResourceOptions? opts = null)
    public VrackNetwork(String name, VrackNetworkArgs args)
    public VrackNetwork(String name, VrackNetworkArgs args, CustomResourceOptions options)
    
    type: ovh:IpLoadBalancing:VrackNetwork
    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 VrackNetworkArgs
    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 VrackNetworkArgs
    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 VrackNetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VrackNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VrackNetworkArgs
    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 vrackNetworkResource = new Ovh.IpLoadBalancing.VrackNetwork("vrackNetworkResource", new()
    {
        NatIp = "string",
        ServiceName = "string",
        Subnet = "string",
        DisplayName = "string",
        FarmIds = new[]
        {
            0,
        },
        Vlan = 0,
    });
    
    example, err := iploadbalancing.NewVrackNetwork(ctx, "vrackNetworkResource", &iploadbalancing.VrackNetworkArgs{
    	NatIp:       pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Subnet:      pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	FarmIds: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	Vlan: pulumi.Int(0),
    })
    
    var vrackNetworkResource = new VrackNetwork("vrackNetworkResource", VrackNetworkArgs.builder()
        .natIp("string")
        .serviceName("string")
        .subnet("string")
        .displayName("string")
        .farmIds(0)
        .vlan(0)
        .build());
    
    vrack_network_resource = ovh.ip_load_balancing.VrackNetwork("vrackNetworkResource",
        nat_ip="string",
        service_name="string",
        subnet="string",
        display_name="string",
        farm_ids=[0],
        vlan=0)
    
    const vrackNetworkResource = new ovh.iploadbalancing.VrackNetwork("vrackNetworkResource", {
        natIp: "string",
        serviceName: "string",
        subnet: "string",
        displayName: "string",
        farmIds: [0],
        vlan: 0,
    });
    
    type: ovh:IpLoadBalancing:VrackNetwork
    properties:
        displayName: string
        farmIds:
            - 0
        natIp: string
        serviceName: string
        subnet: string
        vlan: 0
    

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

    NatIp string
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    ServiceName string
    The internal name of your IP load balancing
    Subnet string
    IP block of the private network in the vRack
    DisplayName string
    Human readable name for your vrack network
    FarmIds List<int>
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    Vlan int
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    NatIp string
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    ServiceName string
    The internal name of your IP load balancing
    Subnet string
    IP block of the private network in the vRack
    DisplayName string
    Human readable name for your vrack network
    FarmIds []int
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    Vlan int
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    natIp String
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    serviceName String
    The internal name of your IP load balancing
    subnet String
    IP block of the private network in the vRack
    displayName String
    Human readable name for your vrack network
    farmIds List<Integer>
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    vlan Integer
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    natIp string
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    serviceName string
    The internal name of your IP load balancing
    subnet string
    IP block of the private network in the vRack
    displayName string
    Human readable name for your vrack network
    farmIds number[]
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    vlan number
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    nat_ip str
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    service_name str
    The internal name of your IP load balancing
    subnet str
    IP block of the private network in the vRack
    display_name str
    Human readable name for your vrack network
    farm_ids Sequence[int]
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    vlan int
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    natIp String
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    serviceName String
    The internal name of your IP load balancing
    subnet String
    IP block of the private network in the vRack
    displayName String
    Human readable name for your vrack network
    farmIds List<Number>
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    vlan Number
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    VrackNetworkId int
    (Required) Internal Load Balancer identifier of the vRack private network
    Id string
    The provider-assigned unique ID for this managed resource.
    VrackNetworkId int
    (Required) Internal Load Balancer identifier of the vRack private network
    id String
    The provider-assigned unique ID for this managed resource.
    vrackNetworkId Integer
    (Required) Internal Load Balancer identifier of the vRack private network
    id string
    The provider-assigned unique ID for this managed resource.
    vrackNetworkId number
    (Required) Internal Load Balancer identifier of the vRack private network
    id str
    The provider-assigned unique ID for this managed resource.
    vrack_network_id int
    (Required) Internal Load Balancer identifier of the vRack private network
    id String
    The provider-assigned unique ID for this managed resource.
    vrackNetworkId Number
    (Required) Internal Load Balancer identifier of the vRack private network

    Look up Existing VrackNetwork Resource

    Get an existing VrackNetwork 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?: VrackNetworkState, opts?: CustomResourceOptions): VrackNetwork
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            farm_ids: Optional[Sequence[int]] = None,
            nat_ip: Optional[str] = None,
            service_name: Optional[str] = None,
            subnet: Optional[str] = None,
            vlan: Optional[int] = None,
            vrack_network_id: Optional[int] = None) -> VrackNetwork
    func GetVrackNetwork(ctx *Context, name string, id IDInput, state *VrackNetworkState, opts ...ResourceOption) (*VrackNetwork, error)
    public static VrackNetwork Get(string name, Input<string> id, VrackNetworkState? state, CustomResourceOptions? opts = null)
    public static VrackNetwork get(String name, Output<String> id, VrackNetworkState state, CustomResourceOptions options)
    resources:  _:    type: ovh:IpLoadBalancing:VrackNetwork    get:      id: ${id}
    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
    Human readable name for your vrack network
    FarmIds List<int>
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    NatIp string
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    ServiceName string
    The internal name of your IP load balancing
    Subnet string
    IP block of the private network in the vRack
    Vlan int
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    VrackNetworkId int
    (Required) Internal Load Balancer identifier of the vRack private network
    DisplayName string
    Human readable name for your vrack network
    FarmIds []int
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    NatIp string
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    ServiceName string
    The internal name of your IP load balancing
    Subnet string
    IP block of the private network in the vRack
    Vlan int
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    VrackNetworkId int
    (Required) Internal Load Balancer identifier of the vRack private network
    displayName String
    Human readable name for your vrack network
    farmIds List<Integer>
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    natIp String
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    serviceName String
    The internal name of your IP load balancing
    subnet String
    IP block of the private network in the vRack
    vlan Integer
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    vrackNetworkId Integer
    (Required) Internal Load Balancer identifier of the vRack private network
    displayName string
    Human readable name for your vrack network
    farmIds number[]
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    natIp string
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    serviceName string
    The internal name of your IP load balancing
    subnet string
    IP block of the private network in the vRack
    vlan number
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    vrackNetworkId number
    (Required) Internal Load Balancer identifier of the vRack private network
    display_name str
    Human readable name for your vrack network
    farm_ids Sequence[int]
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    nat_ip str
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    service_name str
    The internal name of your IP load balancing
    subnet str
    IP block of the private network in the vRack
    vlan int
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    vrack_network_id int
    (Required) Internal Load Balancer identifier of the vRack private network
    displayName String
    Human readable name for your vrack network
    farmIds List<Number>
    This attribute is there for documentation purpose only and isnt passed to the OVHcloud API as it may conflicts with http/tcp farms vrack_network_id attribute
    natIp String
    An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The blck must be in the private network and reserved for the Load Balancer
    serviceName String
    The internal name of your IP load balancing
    subnet String
    IP block of the private network in the vRack
    vlan Number
    VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
    vrackNetworkId Number
    (Required) Internal Load Balancer identifier of the vRack private network

    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 v2.2.3 published on Friday, Jun 6, 2025 by OVHcloud