1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. CloudNetworkPrivateVrackSubnet
Viewing docs for OVHCloud v2.15.0
published on Monday, Jun 29, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.15.0
published on Monday, Jun 29, 2026 by OVHcloud

    Creates a subnet in a private network (vRack) in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const network = new ovh.CloudNetworkPrivateVrack("network", {
        serviceName: "<public cloud project ID>",
        name: "my-private-network",
        region: "GRA1",
    });
    const subnet = new ovh.CloudNetworkPrivateVrackSubnet("subnet", {
        serviceName: network.serviceName,
        networkId: network.id,
        name: "my-subnet",
        cidr: "10.0.0.0/24",
        dhcpEnabled: true,
        gatewayIp: "10.0.0.1",
        region: "GRA1",
        dnsNameservers: ["213.186.33.99"],
        allocationPools: [{
            start: "10.0.0.2",
            end: "10.0.0.254",
        }],
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    network = ovh.CloudNetworkPrivateVrack("network",
        service_name="<public cloud project ID>",
        name="my-private-network",
        region="GRA1")
    subnet = ovh.CloudNetworkPrivateVrackSubnet("subnet",
        service_name=network.service_name,
        network_id=network.id,
        name="my-subnet",
        cidr="10.0.0.0/24",
        dhcp_enabled=True,
        gateway_ip="10.0.0.1",
        region="GRA1",
        dns_nameservers=["213.186.33.99"],
        allocation_pools=[{
            "start": "10.0.0.2",
            "end": "10.0.0.254",
        }])
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network, err := ovh.NewCloudNetworkPrivateVrack(ctx, "network", &ovh.CloudNetworkPrivateVrackArgs{
    			ServiceName: pulumi.String("<public cloud project ID>"),
    			Name:        pulumi.String("my-private-network"),
    			Region:      pulumi.String("GRA1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ovh.NewCloudNetworkPrivateVrackSubnet(ctx, "subnet", &ovh.CloudNetworkPrivateVrackSubnetArgs{
    			ServiceName: network.ServiceName,
    			NetworkId:   network.ID(),
    			Name:        pulumi.String("my-subnet"),
    			Cidr:        pulumi.String("10.0.0.0/24"),
    			DhcpEnabled: pulumi.Bool(true),
    			GatewayIp:   pulumi.String("10.0.0.1"),
    			Region:      pulumi.String("GRA1"),
    			DnsNameservers: pulumi.StringArray{
    				pulumi.String("213.186.33.99"),
    			},
    			AllocationPools: ovh.CloudNetworkPrivateVrackSubnetAllocationPoolArray{
    				&ovh.CloudNetworkPrivateVrackSubnetAllocationPoolArgs{
    					Start: pulumi.String("10.0.0.2"),
    					End:   pulumi.String("10.0.0.254"),
    				},
    			},
    		})
    		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 network = new Ovh.CloudNetworkPrivateVrack("network", new()
        {
            ServiceName = "<public cloud project ID>",
            Name = "my-private-network",
            Region = "GRA1",
        });
    
        var subnet = new Ovh.CloudNetworkPrivateVrackSubnet("subnet", new()
        {
            ServiceName = network.ServiceName,
            NetworkId = network.Id,
            Name = "my-subnet",
            Cidr = "10.0.0.0/24",
            DhcpEnabled = true,
            GatewayIp = "10.0.0.1",
            Region = "GRA1",
            DnsNameservers = new[]
            {
                "213.186.33.99",
            },
            AllocationPools = new[]
            {
                new Ovh.Inputs.CloudNetworkPrivateVrackSubnetAllocationPoolArgs
                {
                    Start = "10.0.0.2",
                    End = "10.0.0.254",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.ovhcloud.pulumi.ovh.CloudNetworkPrivateVrack;
    import com.ovhcloud.pulumi.ovh.CloudNetworkPrivateVrackArgs;
    import com.ovhcloud.pulumi.ovh.CloudNetworkPrivateVrackSubnet;
    import com.ovhcloud.pulumi.ovh.CloudNetworkPrivateVrackSubnetArgs;
    import com.pulumi.ovh.inputs.CloudNetworkPrivateVrackSubnetAllocationPoolArgs;
    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) {
            var network = new CloudNetworkPrivateVrack("network", CloudNetworkPrivateVrackArgs.builder()
                .serviceName("<public cloud project ID>")
                .name("my-private-network")
                .region("GRA1")
                .build());
    
            var subnet = new CloudNetworkPrivateVrackSubnet("subnet", CloudNetworkPrivateVrackSubnetArgs.builder()
                .serviceName(network.serviceName())
                .networkId(network.id())
                .name("my-subnet")
                .cidr("10.0.0.0/24")
                .dhcpEnabled(true)
                .gatewayIp("10.0.0.1")
                .region("GRA1")
                .dnsNameservers("213.186.33.99")
                .allocationPools(CloudNetworkPrivateVrackSubnetAllocationPoolArgs.builder()
                    .start("10.0.0.2")
                    .end("10.0.0.254")
                    .build())
                .build());
    
        }
    }
    
    resources:
      network:
        type: ovh:CloudNetworkPrivateVrack
        properties:
          serviceName: <public cloud project ID>
          name: my-private-network
          region: GRA1
      subnet:
        type: ovh:CloudNetworkPrivateVrackSubnet
        properties:
          serviceName: ${network.serviceName}
          networkId: ${network.id}
          name: my-subnet
          cidr: 10.0.0.0/24
          dhcpEnabled: true
          gatewayIp: 10.0.0.1
          region: GRA1
          dnsNameservers:
            - 213.186.33.99
          allocationPools:
            - start: 10.0.0.2
              end: 10.0.0.254
    
    Example coming soon!
    

    Create CloudNetworkPrivateVrackSubnet Resource

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

    Constructor syntax

    new CloudNetworkPrivateVrackSubnet(name: string, args: CloudNetworkPrivateVrackSubnetArgs, opts?: CustomResourceOptions);
    @overload
    def CloudNetworkPrivateVrackSubnet(resource_name: str,
                                       args: CloudNetworkPrivateVrackSubnetArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudNetworkPrivateVrackSubnet(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       cidr: Optional[str] = None,
                                       network_id: Optional[str] = None,
                                       region: Optional[str] = None,
                                       service_name: Optional[str] = None,
                                       allocation_pools: Optional[Sequence[CloudNetworkPrivateVrackSubnetAllocationPoolArgs]] = None,
                                       availability_zone: Optional[str] = None,
                                       description: Optional[str] = None,
                                       dhcp_enabled: Optional[bool] = None,
                                       dns_nameservers: Optional[Sequence[str]] = None,
                                       gateway_ip: Optional[str] = None,
                                       name: Optional[str] = None)
    func NewCloudNetworkPrivateVrackSubnet(ctx *Context, name string, args CloudNetworkPrivateVrackSubnetArgs, opts ...ResourceOption) (*CloudNetworkPrivateVrackSubnet, error)
    public CloudNetworkPrivateVrackSubnet(string name, CloudNetworkPrivateVrackSubnetArgs args, CustomResourceOptions? opts = null)
    public CloudNetworkPrivateVrackSubnet(String name, CloudNetworkPrivateVrackSubnetArgs args)
    public CloudNetworkPrivateVrackSubnet(String name, CloudNetworkPrivateVrackSubnetArgs args, CustomResourceOptions options)
    
    type: ovh:CloudNetworkPrivateVrackSubnet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ovh_cloudnetworkprivatevracksubnet" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args CloudNetworkPrivateVrackSubnetArgs
    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 CloudNetworkPrivateVrackSubnetArgs
    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 CloudNetworkPrivateVrackSubnetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudNetworkPrivateVrackSubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudNetworkPrivateVrackSubnetArgs
    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 cloudNetworkPrivateVrackSubnetResource = new Ovh.CloudNetworkPrivateVrackSubnet("cloudNetworkPrivateVrackSubnetResource", new()
    {
        Cidr = "string",
        NetworkId = "string",
        Region = "string",
        ServiceName = "string",
        AllocationPools = new[]
        {
            new Ovh.Inputs.CloudNetworkPrivateVrackSubnetAllocationPoolArgs
            {
                End = "string",
                Start = "string",
            },
        },
        AvailabilityZone = "string",
        Description = "string",
        DhcpEnabled = false,
        DnsNameservers = new[]
        {
            "string",
        },
        GatewayIp = "string",
        Name = "string",
    });
    
    example, err := ovh.NewCloudNetworkPrivateVrackSubnet(ctx, "cloudNetworkPrivateVrackSubnetResource", &ovh.CloudNetworkPrivateVrackSubnetArgs{
    	Cidr:        pulumi.String("string"),
    	NetworkId:   pulumi.String("string"),
    	Region:      pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	AllocationPools: ovh.CloudNetworkPrivateVrackSubnetAllocationPoolArray{
    		&ovh.CloudNetworkPrivateVrackSubnetAllocationPoolArgs{
    			End:   pulumi.String("string"),
    			Start: pulumi.String("string"),
    		},
    	},
    	AvailabilityZone: pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	DhcpEnabled:      pulumi.Bool(false),
    	DnsNameservers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	GatewayIp: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    })
    
    resource "ovh_cloudnetworkprivatevracksubnet" "cloudNetworkPrivateVrackSubnetResource" {
      cidr         = "string"
      network_id   = "string"
      region       = "string"
      service_name = "string"
      allocation_pools {
        end   = "string"
        start = "string"
      }
      availability_zone = "string"
      description       = "string"
      dhcp_enabled      = false
      dns_nameservers   = ["string"]
      gateway_ip        = "string"
      name              = "string"
    }
    
    var cloudNetworkPrivateVrackSubnetResource = new CloudNetworkPrivateVrackSubnet("cloudNetworkPrivateVrackSubnetResource", CloudNetworkPrivateVrackSubnetArgs.builder()
        .cidr("string")
        .networkId("string")
        .region("string")
        .serviceName("string")
        .allocationPools(CloudNetworkPrivateVrackSubnetAllocationPoolArgs.builder()
            .end("string")
            .start("string")
            .build())
        .availabilityZone("string")
        .description("string")
        .dhcpEnabled(false)
        .dnsNameservers("string")
        .gatewayIp("string")
        .name("string")
        .build());
    
    cloud_network_private_vrack_subnet_resource = ovh.CloudNetworkPrivateVrackSubnet("cloudNetworkPrivateVrackSubnetResource",
        cidr="string",
        network_id="string",
        region="string",
        service_name="string",
        allocation_pools=[{
            "end": "string",
            "start": "string",
        }],
        availability_zone="string",
        description="string",
        dhcp_enabled=False,
        dns_nameservers=["string"],
        gateway_ip="string",
        name="string")
    
    const cloudNetworkPrivateVrackSubnetResource = new ovh.CloudNetworkPrivateVrackSubnet("cloudNetworkPrivateVrackSubnetResource", {
        cidr: "string",
        networkId: "string",
        region: "string",
        serviceName: "string",
        allocationPools: [{
            end: "string",
            start: "string",
        }],
        availabilityZone: "string",
        description: "string",
        dhcpEnabled: false,
        dnsNameservers: ["string"],
        gatewayIp: "string",
        name: "string",
    });
    
    type: ovh:CloudNetworkPrivateVrackSubnet
    properties:
        allocationPools:
            - end: string
              start: string
        availabilityZone: string
        cidr: string
        description: string
        dhcpEnabled: false
        dnsNameservers:
            - string
        gatewayIp: string
        name: string
        networkId: string
        region: string
        serviceName: string
    

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

    Cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    NetworkId string
    Network ID of the parent private network. Changing this value recreates the resource.
    Region string
    Region where the subnet will be created. Changing this value recreates the resource.
    ServiceName string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    AllocationPools List<CloudNetworkPrivateVrackSubnetAllocationPool>
    IP address allocation pools:
    AvailabilityZone string
    Availability zone within the region.
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled on the subnet.
    DnsNameservers List<string>
    List of DNS nameserver addresses.
    GatewayIp string
    Default gateway IP address.
    Name string
    Subnet name.
    Cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    NetworkId string
    Network ID of the parent private network. Changing this value recreates the resource.
    Region string
    Region where the subnet will be created. Changing this value recreates the resource.
    ServiceName string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    AllocationPools []CloudNetworkPrivateVrackSubnetAllocationPoolArgs
    IP address allocation pools:
    AvailabilityZone string
    Availability zone within the region.
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled on the subnet.
    DnsNameservers []string
    List of DNS nameserver addresses.
    GatewayIp string
    Default gateway IP address.
    Name string
    Subnet name.
    cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    network_id string
    Network ID of the parent private network. Changing this value recreates the resource.
    region string
    Region where the subnet will be created. Changing this value recreates the resource.
    service_name string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    allocation_pools list(object)
    IP address allocation pools:
    availability_zone string
    Availability zone within the region.
    description string
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled on the subnet.
    dns_nameservers list(string)
    List of DNS nameserver addresses.
    gateway_ip string
    Default gateway IP address.
    name string
    Subnet name.
    cidr String
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    networkId String
    Network ID of the parent private network. Changing this value recreates the resource.
    region String
    Region where the subnet will be created. Changing this value recreates the resource.
    serviceName String
    Service name (ID of the cloud project). Changing this value recreates the resource.
    allocationPools List<CloudNetworkPrivateVrackSubnetAllocationPool>
    IP address allocation pools:
    availabilityZone String
    Availability zone within the region.
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers List<String>
    List of DNS nameserver addresses.
    gatewayIp String
    Default gateway IP address.
    name String
    Subnet name.
    cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    networkId string
    Network ID of the parent private network. Changing this value recreates the resource.
    region string
    Region where the subnet will be created. Changing this value recreates the resource.
    serviceName string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    allocationPools CloudNetworkPrivateVrackSubnetAllocationPool[]
    IP address allocation pools:
    availabilityZone string
    Availability zone within the region.
    description string
    Subnet description.
    dhcpEnabled boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers string[]
    List of DNS nameserver addresses.
    gatewayIp string
    Default gateway IP address.
    name string
    Subnet name.
    cidr str
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    network_id str
    Network ID of the parent private network. Changing this value recreates the resource.
    region str
    Region where the subnet will be created. Changing this value recreates the resource.
    service_name str
    Service name (ID of the cloud project). Changing this value recreates the resource.
    allocation_pools Sequence[CloudNetworkPrivateVrackSubnetAllocationPoolArgs]
    IP address allocation pools:
    availability_zone str
    Availability zone within the region.
    description str
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled on the subnet.
    dns_nameservers Sequence[str]
    List of DNS nameserver addresses.
    gateway_ip str
    Default gateway IP address.
    name str
    Subnet name.
    cidr String
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    networkId String
    Network ID of the parent private network. Changing this value recreates the resource.
    region String
    Region where the subnet will be created. Changing this value recreates the resource.
    serviceName String
    Service name (ID of the cloud project). Changing this value recreates the resource.
    allocationPools List<Property Map>
    IP address allocation pools:
    availabilityZone String
    Availability zone within the region.
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers List<String>
    List of DNS nameserver addresses.
    gatewayIp String
    Default gateway IP address.
    name String
    Subnet name.

    Outputs

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

    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the subnet.
    CurrentState CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    CurrentTasks List<CloudNetworkPrivateVrackSubnetCurrentTask>
    Ongoing asynchronous tasks related to the subnet
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    UpdatedAt string
    Last update date of the subnet.
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Creation date of the subnet.
    CurrentState CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    CurrentTasks []CloudNetworkPrivateVrackSubnetCurrentTask
    Ongoing asynchronous tasks related to the subnet
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    UpdatedAt string
    Last update date of the subnet.
    checksum string
    Computed hash representing the current target specification value.
    created_at string
    Creation date of the subnet.
    current_state object
    Current state of the subnet:
    current_tasks list(object)
    Ongoing asynchronous tasks related to the subnet
    id string
    The provider-assigned unique ID for this managed resource.
    resource_status string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updated_at string
    Last update date of the subnet.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the subnet.
    currentState CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    currentTasks List<CloudNetworkPrivateVrackSubnetCurrentTask>
    Ongoing asynchronous tasks related to the subnet
    id String
    The provider-assigned unique ID for this managed resource.
    resourceStatus String
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt String
    Last update date of the subnet.
    checksum string
    Computed hash representing the current target specification value.
    createdAt string
    Creation date of the subnet.
    currentState CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    currentTasks CloudNetworkPrivateVrackSubnetCurrentTask[]
    Ongoing asynchronous tasks related to the subnet
    id string
    The provider-assigned unique ID for this managed resource.
    resourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt string
    Last update date of the subnet.
    checksum str
    Computed hash representing the current target specification value.
    created_at str
    Creation date of the subnet.
    current_state CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    current_tasks Sequence[CloudNetworkPrivateVrackSubnetCurrentTask]
    Ongoing asynchronous tasks related to the subnet
    id str
    The provider-assigned unique ID for this managed resource.
    resource_status str
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updated_at str
    Last update date of the subnet.
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Creation date of the subnet.
    currentState Property Map
    Current state of the subnet:
    currentTasks List<Property Map>
    Ongoing asynchronous tasks related to the subnet
    id String
    The provider-assigned unique ID for this managed resource.
    resourceStatus String
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt String
    Last update date of the subnet.

    Look up Existing CloudNetworkPrivateVrackSubnet Resource

    Get an existing CloudNetworkPrivateVrackSubnet 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?: CloudNetworkPrivateVrackSubnetState, opts?: CustomResourceOptions): CloudNetworkPrivateVrackSubnet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allocation_pools: Optional[Sequence[CloudNetworkPrivateVrackSubnetAllocationPoolArgs]] = None,
            availability_zone: Optional[str] = None,
            checksum: Optional[str] = None,
            cidr: Optional[str] = None,
            created_at: Optional[str] = None,
            current_state: Optional[CloudNetworkPrivateVrackSubnetCurrentStateArgs] = None,
            current_tasks: Optional[Sequence[CloudNetworkPrivateVrackSubnetCurrentTaskArgs]] = None,
            description: Optional[str] = None,
            dhcp_enabled: Optional[bool] = None,
            dns_nameservers: Optional[Sequence[str]] = None,
            gateway_ip: Optional[str] = None,
            name: Optional[str] = None,
            network_id: Optional[str] = None,
            region: Optional[str] = None,
            resource_status: Optional[str] = None,
            service_name: Optional[str] = None,
            updated_at: Optional[str] = None) -> CloudNetworkPrivateVrackSubnet
    func GetCloudNetworkPrivateVrackSubnet(ctx *Context, name string, id IDInput, state *CloudNetworkPrivateVrackSubnetState, opts ...ResourceOption) (*CloudNetworkPrivateVrackSubnet, error)
    public static CloudNetworkPrivateVrackSubnet Get(string name, Input<string> id, CloudNetworkPrivateVrackSubnetState? state, CustomResourceOptions? opts = null)
    public static CloudNetworkPrivateVrackSubnet get(String name, Output<String> id, CloudNetworkPrivateVrackSubnetState state, CustomResourceOptions options)
    resources:  _:    type: ovh:CloudNetworkPrivateVrackSubnet    get:      id: ${id}
    import {
      to = ovh_cloudnetworkprivatevracksubnet.example
      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:
    AllocationPools List<CloudNetworkPrivateVrackSubnetAllocationPool>
    IP address allocation pools:
    AvailabilityZone string
    Availability zone within the region.
    Checksum string
    Computed hash representing the current target specification value.
    Cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    CreatedAt string
    Creation date of the subnet.
    CurrentState CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    CurrentTasks List<CloudNetworkPrivateVrackSubnetCurrentTask>
    Ongoing asynchronous tasks related to the subnet
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled on the subnet.
    DnsNameservers List<string>
    List of DNS nameserver addresses.
    GatewayIp string
    Default gateway IP address.
    Name string
    Subnet name.
    NetworkId string
    Network ID of the parent private network. Changing this value recreates the resource.
    Region string
    Region where the subnet will be created. Changing this value recreates the resource.
    ResourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    UpdatedAt string
    Last update date of the subnet.
    AllocationPools []CloudNetworkPrivateVrackSubnetAllocationPoolArgs
    IP address allocation pools:
    AvailabilityZone string
    Availability zone within the region.
    Checksum string
    Computed hash representing the current target specification value.
    Cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    CreatedAt string
    Creation date of the subnet.
    CurrentState CloudNetworkPrivateVrackSubnetCurrentStateArgs
    Current state of the subnet:
    CurrentTasks []CloudNetworkPrivateVrackSubnetCurrentTaskArgs
    Ongoing asynchronous tasks related to the subnet
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled on the subnet.
    DnsNameservers []string
    List of DNS nameserver addresses.
    GatewayIp string
    Default gateway IP address.
    Name string
    Subnet name.
    NetworkId string
    Network ID of the parent private network. Changing this value recreates the resource.
    Region string
    Region where the subnet will be created. Changing this value recreates the resource.
    ResourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    UpdatedAt string
    Last update date of the subnet.
    allocation_pools list(object)
    IP address allocation pools:
    availability_zone string
    Availability zone within the region.
    checksum string
    Computed hash representing the current target specification value.
    cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    created_at string
    Creation date of the subnet.
    current_state object
    Current state of the subnet:
    current_tasks list(object)
    Ongoing asynchronous tasks related to the subnet
    description string
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled on the subnet.
    dns_nameservers list(string)
    List of DNS nameserver addresses.
    gateway_ip string
    Default gateway IP address.
    name string
    Subnet name.
    network_id string
    Network ID of the parent private network. Changing this value recreates the resource.
    region string
    Region where the subnet will be created. Changing this value recreates the resource.
    resource_status string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    updated_at string
    Last update date of the subnet.
    allocationPools List<CloudNetworkPrivateVrackSubnetAllocationPool>
    IP address allocation pools:
    availabilityZone String
    Availability zone within the region.
    checksum String
    Computed hash representing the current target specification value.
    cidr String
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    createdAt String
    Creation date of the subnet.
    currentState CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    currentTasks List<CloudNetworkPrivateVrackSubnetCurrentTask>
    Ongoing asynchronous tasks related to the subnet
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers List<String>
    List of DNS nameserver addresses.
    gatewayIp String
    Default gateway IP address.
    name String
    Subnet name.
    networkId String
    Network ID of the parent private network. Changing this value recreates the resource.
    region String
    Region where the subnet will be created. Changing this value recreates the resource.
    resourceStatus String
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    Service name (ID of the cloud project). Changing this value recreates the resource.
    updatedAt String
    Last update date of the subnet.
    allocationPools CloudNetworkPrivateVrackSubnetAllocationPool[]
    IP address allocation pools:
    availabilityZone string
    Availability zone within the region.
    checksum string
    Computed hash representing the current target specification value.
    cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    createdAt string
    Creation date of the subnet.
    currentState CloudNetworkPrivateVrackSubnetCurrentState
    Current state of the subnet:
    currentTasks CloudNetworkPrivateVrackSubnetCurrentTask[]
    Ongoing asynchronous tasks related to the subnet
    description string
    Subnet description.
    dhcpEnabled boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers string[]
    List of DNS nameserver addresses.
    gatewayIp string
    Default gateway IP address.
    name string
    Subnet name.
    networkId string
    Network ID of the parent private network. Changing this value recreates the resource.
    region string
    Region where the subnet will be created. Changing this value recreates the resource.
    resourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName string
    Service name (ID of the cloud project). Changing this value recreates the resource.
    updatedAt string
    Last update date of the subnet.
    allocation_pools Sequence[CloudNetworkPrivateVrackSubnetAllocationPoolArgs]
    IP address allocation pools:
    availability_zone str
    Availability zone within the region.
    checksum str
    Computed hash representing the current target specification value.
    cidr str
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    created_at str
    Creation date of the subnet.
    current_state CloudNetworkPrivateVrackSubnetCurrentStateArgs
    Current state of the subnet:
    current_tasks Sequence[CloudNetworkPrivateVrackSubnetCurrentTaskArgs]
    Ongoing asynchronous tasks related to the subnet
    description str
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled on the subnet.
    dns_nameservers Sequence[str]
    List of DNS nameserver addresses.
    gateway_ip str
    Default gateway IP address.
    name str
    Subnet name.
    network_id str
    Network ID of the parent private network. Changing this value recreates the resource.
    region str
    Region where the subnet will be created. Changing this value recreates the resource.
    resource_status str
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name str
    Service name (ID of the cloud project). Changing this value recreates the resource.
    updated_at str
    Last update date of the subnet.
    allocationPools List<Property Map>
    IP address allocation pools:
    availabilityZone String
    Availability zone within the region.
    checksum String
    Computed hash representing the current target specification value.
    cidr String
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    createdAt String
    Creation date of the subnet.
    currentState Property Map
    Current state of the subnet:
    currentTasks List<Property Map>
    Ongoing asynchronous tasks related to the subnet
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers List<String>
    List of DNS nameserver addresses.
    gatewayIp String
    Default gateway IP address.
    name String
    Subnet name.
    networkId String
    Network ID of the parent private network. Changing this value recreates the resource.
    region String
    Region where the subnet will be created. Changing this value recreates the resource.
    resourceStatus String
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    Service name (ID of the cloud project). Changing this value recreates the resource.
    updatedAt String
    Last update date of the subnet.

    Supporting Types

    CloudNetworkPrivateVrackSubnetAllocationPool, CloudNetworkPrivateVrackSubnetAllocationPoolArgs

    End string
    End IP address of the pool.
    Start string
    Start IP address of the pool.
    End string
    End IP address of the pool.
    Start string
    Start IP address of the pool.
    end string
    End IP address of the pool.
    start string
    Start IP address of the pool.
    end String
    End IP address of the pool.
    start String
    Start IP address of the pool.
    end string
    End IP address of the pool.
    start string
    Start IP address of the pool.
    end str
    End IP address of the pool.
    start str
    Start IP address of the pool.
    end String
    End IP address of the pool.
    start String
    Start IP address of the pool.

    CloudNetworkPrivateVrackSubnetCurrentState, CloudNetworkPrivateVrackSubnetCurrentStateArgs

    AllocationPools List<CloudNetworkPrivateVrackSubnetCurrentStateAllocationPool>
    IP address allocation pools:
    Cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled on the subnet.
    DnsNameservers List<string>
    List of DNS nameserver addresses.
    GatewayIp string
    Default gateway IP address.
    HostRoutes List<CloudNetworkPrivateVrackSubnetCurrentStateHostRoute>
    Static host routes:
    Location CloudNetworkPrivateVrackSubnetCurrentStateLocation
    Location details:
    Name string
    Subnet name.
    AllocationPools []CloudNetworkPrivateVrackSubnetCurrentStateAllocationPool
    IP address allocation pools:
    Cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled on the subnet.
    DnsNameservers []string
    List of DNS nameserver addresses.
    GatewayIp string
    Default gateway IP address.
    HostRoutes []CloudNetworkPrivateVrackSubnetCurrentStateHostRoute
    Static host routes:
    Location CloudNetworkPrivateVrackSubnetCurrentStateLocation
    Location details:
    Name string
    Subnet name.
    allocation_pools list(object)
    IP address allocation pools:
    cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    description string
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled on the subnet.
    dns_nameservers list(string)
    List of DNS nameserver addresses.
    gateway_ip string
    Default gateway IP address.
    host_routes list(object)
    Static host routes:
    location object
    Location details:
    name string
    Subnet name.
    allocationPools List<CloudNetworkPrivateVrackSubnetCurrentStateAllocationPool>
    IP address allocation pools:
    cidr String
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers List<String>
    List of DNS nameserver addresses.
    gatewayIp String
    Default gateway IP address.
    hostRoutes List<CloudNetworkPrivateVrackSubnetCurrentStateHostRoute>
    Static host routes:
    location CloudNetworkPrivateVrackSubnetCurrentStateLocation
    Location details:
    name String
    Subnet name.
    allocationPools CloudNetworkPrivateVrackSubnetCurrentStateAllocationPool[]
    IP address allocation pools:
    cidr string
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    description string
    Subnet description.
    dhcpEnabled boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers string[]
    List of DNS nameserver addresses.
    gatewayIp string
    Default gateway IP address.
    hostRoutes CloudNetworkPrivateVrackSubnetCurrentStateHostRoute[]
    Static host routes:
    location CloudNetworkPrivateVrackSubnetCurrentStateLocation
    Location details:
    name string
    Subnet name.
    allocation_pools Sequence[CloudNetworkPrivateVrackSubnetCurrentStateAllocationPool]
    IP address allocation pools:
    cidr str
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    description str
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled on the subnet.
    dns_nameservers Sequence[str]
    List of DNS nameserver addresses.
    gateway_ip str
    Default gateway IP address.
    host_routes Sequence[CloudNetworkPrivateVrackSubnetCurrentStateHostRoute]
    Static host routes:
    location CloudNetworkPrivateVrackSubnetCurrentStateLocation
    Location details:
    name str
    Subnet name.
    allocationPools List<Property Map>
    IP address allocation pools:
    cidr String
    CIDR address range for the subnet (e.g. 10.0.0.0/24). Changing this value recreates the resource.
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled on the subnet.
    dnsNameservers List<String>
    List of DNS nameserver addresses.
    gatewayIp String
    Default gateway IP address.
    hostRoutes List<Property Map>
    Static host routes:
    location Property Map
    Location details:
    name String
    Subnet name.

    CloudNetworkPrivateVrackSubnetCurrentStateAllocationPool, CloudNetworkPrivateVrackSubnetCurrentStateAllocationPoolArgs

    End string
    End IP address of the pool.
    Start string
    Start IP address of the pool.
    End string
    End IP address of the pool.
    Start string
    Start IP address of the pool.
    end string
    End IP address of the pool.
    start string
    Start IP address of the pool.
    end String
    End IP address of the pool.
    start String
    Start IP address of the pool.
    end string
    End IP address of the pool.
    start string
    Start IP address of the pool.
    end str
    End IP address of the pool.
    start str
    Start IP address of the pool.
    end String
    End IP address of the pool.
    start String
    Start IP address of the pool.

    CloudNetworkPrivateVrackSubnetCurrentStateHostRoute, CloudNetworkPrivateVrackSubnetCurrentStateHostRouteArgs

    Destination string
    Destination CIDR.
    NextHop string
    Next hop IP address.
    Destination string
    Destination CIDR.
    NextHop string
    Next hop IP address.
    destination string
    Destination CIDR.
    next_hop string
    Next hop IP address.
    destination String
    Destination CIDR.
    nextHop String
    Next hop IP address.
    destination string
    Destination CIDR.
    nextHop string
    Next hop IP address.
    destination str
    Destination CIDR.
    next_hop str
    Next hop IP address.
    destination String
    Destination CIDR.
    nextHop String
    Next hop IP address.

    CloudNetworkPrivateVrackSubnetCurrentStateLocation, CloudNetworkPrivateVrackSubnetCurrentStateLocationArgs

    AvailabilityZone string
    Availability zone within the region.
    Region string
    Region where the subnet will be created. Changing this value recreates the resource.
    AvailabilityZone string
    Availability zone within the region.
    Region string
    Region where the subnet will be created. Changing this value recreates the resource.
    availability_zone string
    Availability zone within the region.
    region string
    Region where the subnet will be created. Changing this value recreates the resource.
    availabilityZone String
    Availability zone within the region.
    region String
    Region where the subnet will be created. Changing this value recreates the resource.
    availabilityZone string
    Availability zone within the region.
    region string
    Region where the subnet will be created. Changing this value recreates the resource.
    availability_zone str
    Availability zone within the region.
    region str
    Region where the subnet will be created. Changing this value recreates the resource.
    availabilityZone String
    Availability zone within the region.
    region String
    Region where the subnet will be created. Changing this value recreates the resource.

    CloudNetworkPrivateVrackSubnetCurrentTask, CloudNetworkPrivateVrackSubnetCurrentTaskArgs

    Errors List<CloudNetworkPrivateVrackSubnetCurrentTaskError>
    Errors that occured on the task
    Id string
    Subnet ID.
    Link string
    Link to the task details
    Status string
    Current global status of the current task
    Type string
    Type of the current task
    Errors []CloudNetworkPrivateVrackSubnetCurrentTaskError
    Errors that occured on the task
    Id string
    Subnet ID.
    Link string
    Link to the task details
    Status string
    Current global status of the current task
    Type string
    Type of the current task
    errors list(object)
    Errors that occured on the task
    id string
    Subnet ID.
    link string
    Link to the task details
    status string
    Current global status of the current task
    type string
    Type of the current task
    errors List<CloudNetworkPrivateVrackSubnetCurrentTaskError>
    Errors that occured on the task
    id String
    Subnet ID.
    link String
    Link to the task details
    status String
    Current global status of the current task
    type String
    Type of the current task
    errors CloudNetworkPrivateVrackSubnetCurrentTaskError[]
    Errors that occured on the task
    id string
    Subnet ID.
    link string
    Link to the task details
    status string
    Current global status of the current task
    type string
    Type of the current task
    errors Sequence[CloudNetworkPrivateVrackSubnetCurrentTaskError]
    Errors that occured on the task
    id str
    Subnet ID.
    link str
    Link to the task details
    status str
    Current global status of the current task
    type str
    Type of the current task
    errors List<Property Map>
    Errors that occured on the task
    id String
    Subnet ID.
    link String
    Link to the task details
    status String
    Current global status of the current task
    type String
    Type of the current task

    CloudNetworkPrivateVrackSubnetCurrentTaskError, CloudNetworkPrivateVrackSubnetCurrentTaskErrorArgs

    Message string
    Error description
    Message string
    Error description
    message string
    Error description
    message String
    Error description
    message string
    Error description
    message str
    Error description
    message String
    Error description

    Import

    A cloud private network subnet can be imported using the service_name, network_id and id, separated by /:

    terraform

    import {

    to = ovh_cloud_network_private_vrack_subnet.subnet

    id = “<service_name>/<network_id>/

    }

    bash

    $ pulumi import ovh:index/cloudNetworkPrivateVrackSubnet:CloudNetworkPrivateVrackSubnet subnet service_name/network_id/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
    Viewing docs for OVHCloud v2.15.0
    published on Monday, Jun 29, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial