1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudNetworkPrivateVrackSubnets
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    Use this data source to list the subnets of 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 subnets = ovh.getCloudNetworkPrivateVrackSubnets({
        serviceName: "<public cloud project ID>",
        networkId: "<network ID>",
    });
    export const subnetCidrs = subnets.then(subnets => .map(s => (s.cidr)));
    
    import pulumi
    import pulumi_ovh as ovh
    
    subnets = ovh.get_cloud_network_private_vrack_subnets(service_name="<public cloud project ID>",
        network_id="<network ID>")
    pulumi.export("subnetCidrs", [s.cidr for s in subnets.subnets])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var subnets = Ovh.GetCloudNetworkPrivateVrackSubnets.Invoke(new()
        {
            ServiceName = "<public cloud project ID>",
            NetworkId = "<network ID>",
        });
    
        return new Dictionary<string, object?>
        {
            ["subnetCidrs"] = .Select(s => 
            {
                return s.Cidr;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    

    Using getCloudNetworkPrivateVrackSubnets

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCloudNetworkPrivateVrackSubnets(args: GetCloudNetworkPrivateVrackSubnetsArgs, opts?: InvokeOptions): Promise<GetCloudNetworkPrivateVrackSubnetsResult>
    function getCloudNetworkPrivateVrackSubnetsOutput(args: GetCloudNetworkPrivateVrackSubnetsOutputArgs, opts?: InvokeOptions): Output<GetCloudNetworkPrivateVrackSubnetsResult>
    def get_cloud_network_private_vrack_subnets(network_id: Optional[str] = None,
                                                service_name: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetCloudNetworkPrivateVrackSubnetsResult
    def get_cloud_network_private_vrack_subnets_output(network_id: pulumi.Input[Optional[str]] = None,
                                                service_name: pulumi.Input[Optional[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetCloudNetworkPrivateVrackSubnetsResult]
    func GetCloudNetworkPrivateVrackSubnets(ctx *Context, args *GetCloudNetworkPrivateVrackSubnetsArgs, opts ...InvokeOption) (*GetCloudNetworkPrivateVrackSubnetsResult, error)
    func GetCloudNetworkPrivateVrackSubnetsOutput(ctx *Context, args *GetCloudNetworkPrivateVrackSubnetsOutputArgs, opts ...InvokeOption) GetCloudNetworkPrivateVrackSubnetsResultOutput

    > Note: This function is named GetCloudNetworkPrivateVrackSubnets in the Go SDK.

    public static class GetCloudNetworkPrivateVrackSubnets 
    {
        public static Task<GetCloudNetworkPrivateVrackSubnetsResult> InvokeAsync(GetCloudNetworkPrivateVrackSubnetsArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudNetworkPrivateVrackSubnetsResult> Invoke(GetCloudNetworkPrivateVrackSubnetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudNetworkPrivateVrackSubnetsResult> getCloudNetworkPrivateVrackSubnets(GetCloudNetworkPrivateVrackSubnetsArgs args, InvokeOptions options)
    public static Output<GetCloudNetworkPrivateVrackSubnetsResult> getCloudNetworkPrivateVrackSubnets(GetCloudNetworkPrivateVrackSubnetsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudNetworkPrivateVrackSubnets:getCloudNetworkPrivateVrackSubnets
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_network_private_vrack_subnets" "name" {
        # arguments
    }

    The following arguments are supported:

    NetworkId string
    Network ID of the parent private network.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    NetworkId string
    Network ID of the parent private network.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    network_id string
    Network ID of the parent private network.
    service_name string
    Service name of the resource representing the id of the cloud project.
    networkId String
    Network ID of the parent private network.
    serviceName String
    Service name of the resource representing the id of the cloud project.
    networkId string
    Network ID of the parent private network.
    serviceName string
    Service name of the resource representing the id of the cloud project.
    network_id str
    Network ID of the parent private network.
    service_name str
    Service name of the resource representing the id of the cloud project.
    networkId String
    Network ID of the parent private network.
    serviceName String
    Service name of the resource representing the id of the cloud project.

    getCloudNetworkPrivateVrackSubnets Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkId string
    ServiceName string
    Subnets List<GetCloudNetworkPrivateVrackSubnetsSubnet>
    List of subnets. Each element exports:
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkId string
    ServiceName string
    Subnets []GetCloudNetworkPrivateVrackSubnetsSubnet
    List of subnets. Each element exports:
    id string
    The provider-assigned unique ID for this managed resource.
    network_id string
    service_name string
    subnets list(object)
    List of subnets. Each element exports:
    id String
    The provider-assigned unique ID for this managed resource.
    networkId String
    serviceName String
    subnets List<GetCloudNetworkPrivateVrackSubnetsSubnet>
    List of subnets. Each element exports:
    id string
    The provider-assigned unique ID for this managed resource.
    networkId string
    serviceName string
    subnets GetCloudNetworkPrivateVrackSubnetsSubnet[]
    List of subnets. Each element exports:
    id str
    The provider-assigned unique ID for this managed resource.
    network_id str
    service_name str
    subnets Sequence[GetCloudNetworkPrivateVrackSubnetsSubnet]
    List of subnets. Each element exports:
    id String
    The provider-assigned unique ID for this managed resource.
    networkId String
    serviceName String
    subnets List<Property Map>
    List of subnets. Each element exports:

    Supporting Types

    GetCloudNetworkPrivateVrackSubnetsSubnet

    AllocationPools List<GetCloudNetworkPrivateVrackSubnetsSubnetAllocationPool>
    IP address allocation pools:
    Checksum string
    Computed hash representing the current target specification value.
    Cidr string
    CIDR address range.
    CreatedAt string
    Creation date of the subnet.
    CurrentState GetCloudNetworkPrivateVrackSubnetsSubnetCurrentState
    Current state of the subnet:
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled.
    DnsNameservers List<string>
    Configured DNS nameservers.
    GatewayIp string
    Default gateway IP address.
    Id string
    Subnet ID.
    Location GetCloudNetworkPrivateVrackSubnetsSubnetLocation
    Location details:
    Name string
    Subnet name.
    ResourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    UpdatedAt string
    Last update date of the subnet.
    AllocationPools []GetCloudNetworkPrivateVrackSubnetsSubnetAllocationPool
    IP address allocation pools:
    Checksum string
    Computed hash representing the current target specification value.
    Cidr string
    CIDR address range.
    CreatedAt string
    Creation date of the subnet.
    CurrentState GetCloudNetworkPrivateVrackSubnetsSubnetCurrentState
    Current state of the subnet:
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled.
    DnsNameservers []string
    Configured DNS nameservers.
    GatewayIp string
    Default gateway IP address.
    Id string
    Subnet ID.
    Location GetCloudNetworkPrivateVrackSubnetsSubnetLocation
    Location details:
    Name string
    Subnet name.
    ResourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    UpdatedAt string
    Last update date of the subnet.
    allocation_pools list(object)
    IP address allocation pools:
    checksum string
    Computed hash representing the current target specification value.
    cidr string
    CIDR address range.
    created_at string
    Creation date of the subnet.
    current_state object
    Current state of the subnet:
    description string
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled.
    dns_nameservers list(string)
    Configured DNS nameservers.
    gateway_ip string
    Default gateway IP address.
    id string
    Subnet ID.
    location object
    Location details:
    name string
    Subnet name.
    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.
    allocationPools List<GetCloudNetworkPrivateVrackSubnetsSubnetAllocationPool>
    IP address allocation pools:
    checksum String
    Computed hash representing the current target specification value.
    cidr String
    CIDR address range.
    createdAt String
    Creation date of the subnet.
    currentState GetCloudNetworkPrivateVrackSubnetsSubnetCurrentState
    Current state of the subnet:
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled.
    dnsNameservers List<String>
    Configured DNS nameservers.
    gatewayIp String
    Default gateway IP address.
    id String
    Subnet ID.
    location GetCloudNetworkPrivateVrackSubnetsSubnetLocation
    Location details:
    name String
    Subnet name.
    resourceStatus String
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt String
    Last update date of the subnet.
    allocationPools GetCloudNetworkPrivateVrackSubnetsSubnetAllocationPool[]
    IP address allocation pools:
    checksum string
    Computed hash representing the current target specification value.
    cidr string
    CIDR address range.
    createdAt string
    Creation date of the subnet.
    currentState GetCloudNetworkPrivateVrackSubnetsSubnetCurrentState
    Current state of the subnet:
    description string
    Subnet description.
    dhcpEnabled boolean
    Whether DHCP is enabled.
    dnsNameservers string[]
    Configured DNS nameservers.
    gatewayIp string
    Default gateway IP address.
    id string
    Subnet ID.
    location GetCloudNetworkPrivateVrackSubnetsSubnetLocation
    Location details:
    name string
    Subnet name.
    resourceStatus string
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt string
    Last update date of the subnet.
    allocation_pools Sequence[GetCloudNetworkPrivateVrackSubnetsSubnetAllocationPool]
    IP address allocation pools:
    checksum str
    Computed hash representing the current target specification value.
    cidr str
    CIDR address range.
    created_at str
    Creation date of the subnet.
    current_state GetCloudNetworkPrivateVrackSubnetsSubnetCurrentState
    Current state of the subnet:
    description str
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled.
    dns_nameservers Sequence[str]
    Configured DNS nameservers.
    gateway_ip str
    Default gateway IP address.
    id str
    Subnet ID.
    location GetCloudNetworkPrivateVrackSubnetsSubnetLocation
    Location details:
    name str
    Subnet name.
    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.
    allocationPools List<Property Map>
    IP address allocation pools:
    checksum String
    Computed hash representing the current target specification value.
    cidr String
    CIDR address range.
    createdAt String
    Creation date of the subnet.
    currentState Property Map
    Current state of the subnet:
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled.
    dnsNameservers List<String>
    Configured DNS nameservers.
    gatewayIp String
    Default gateway IP address.
    id String
    Subnet ID.
    location Property Map
    Location details:
    name String
    Subnet name.
    resourceStatus String
    Subnet readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    updatedAt String
    Last update date of the subnet.

    GetCloudNetworkPrivateVrackSubnetsSubnetAllocationPool

    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.

    GetCloudNetworkPrivateVrackSubnetsSubnetCurrentState

    AllocationPools List<GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateAllocationPool>
    IP address allocation pools:
    Cidr string
    CIDR address range.
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled.
    DnsNameservers List<string>
    Configured DNS nameservers.
    GatewayIp string
    Default gateway IP address.
    HostRoutes List<GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateHostRoute>
    Static host routes:
    Location GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateLocation
    Location details:
    Name string
    Subnet name.
    AllocationPools []GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateAllocationPool
    IP address allocation pools:
    Cidr string
    CIDR address range.
    Description string
    Subnet description.
    DhcpEnabled bool
    Whether DHCP is enabled.
    DnsNameservers []string
    Configured DNS nameservers.
    GatewayIp string
    Default gateway IP address.
    HostRoutes []GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateHostRoute
    Static host routes:
    Location GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateLocation
    Location details:
    Name string
    Subnet name.
    allocation_pools list(object)
    IP address allocation pools:
    cidr string
    CIDR address range.
    description string
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled.
    dns_nameservers list(string)
    Configured DNS nameservers.
    gateway_ip string
    Default gateway IP address.
    host_routes list(object)
    Static host routes:
    location object
    Location details:
    name string
    Subnet name.
    allocationPools List<GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateAllocationPool>
    IP address allocation pools:
    cidr String
    CIDR address range.
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled.
    dnsNameservers List<String>
    Configured DNS nameservers.
    gatewayIp String
    Default gateway IP address.
    hostRoutes List<GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateHostRoute>
    Static host routes:
    location GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateLocation
    Location details:
    name String
    Subnet name.
    allocationPools GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateAllocationPool[]
    IP address allocation pools:
    cidr string
    CIDR address range.
    description string
    Subnet description.
    dhcpEnabled boolean
    Whether DHCP is enabled.
    dnsNameservers string[]
    Configured DNS nameservers.
    gatewayIp string
    Default gateway IP address.
    hostRoutes GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateHostRoute[]
    Static host routes:
    location GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateLocation
    Location details:
    name string
    Subnet name.
    allocation_pools Sequence[GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateAllocationPool]
    IP address allocation pools:
    cidr str
    CIDR address range.
    description str
    Subnet description.
    dhcp_enabled bool
    Whether DHCP is enabled.
    dns_nameservers Sequence[str]
    Configured DNS nameservers.
    gateway_ip str
    Default gateway IP address.
    host_routes Sequence[GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateHostRoute]
    Static host routes:
    location GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateLocation
    Location details:
    name str
    Subnet name.
    allocationPools List<Property Map>
    IP address allocation pools:
    cidr String
    CIDR address range.
    description String
    Subnet description.
    dhcpEnabled Boolean
    Whether DHCP is enabled.
    dnsNameservers List<String>
    Configured DNS nameservers.
    gatewayIp String
    Default gateway IP address.
    hostRoutes List<Property Map>
    Static host routes:
    location Property Map
    Location details:
    name String
    Subnet name.

    GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateAllocationPool

    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.

    GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateHostRoute

    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.

    GetCloudNetworkPrivateVrackSubnetsSubnetCurrentStateLocation

    Region string
    Region code.
    Region string
    Region code.
    region string
    Region code.
    region String
    Region code.
    region string
    Region code.
    region str
    Region code.
    region String
    Region code.

    GetCloudNetworkPrivateVrackSubnetsSubnetLocation

    Region string
    Region code.
    Region string
    Region code.
    region string
    Region code.
    region String
    Region code.
    region string
    Region code.
    region str
    Region code.
    region String
    Region code.

    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.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial