Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud
Use this data source to retrieve information about a subnet in a private network (vRack) of a public cloud project.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const subnet = ovh.getCloudNetworkPrivateVrackSubnet({
serviceName: "<public cloud project ID>",
networkId: "<network ID>",
id: "<subnet ID>",
});
export const subnetCidr = subnet.then(subnet => subnet.cidr);
import pulumi
import pulumi_ovh as ovh
subnet = ovh.get_cloud_network_private_vrack_subnet(service_name="<public cloud project ID>",
network_id="<network ID>",
id="<subnet ID>")
pulumi.export("subnetCidr", subnet.cidr)
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 {
subnet, err := ovh.LookupCloudNetworkPrivateVrackSubnet(ctx, &ovh.LookupCloudNetworkPrivateVrackSubnetArgs{
ServiceName: "<public cloud project ID>",
NetworkId: "<network ID>",
Id: "<subnet ID>",
}, nil)
if err != nil {
return err
}
ctx.Export("subnetCidr", subnet.Cidr)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var subnet = Ovh.GetCloudNetworkPrivateVrackSubnet.Invoke(new()
{
ServiceName = "<public cloud project ID>",
NetworkId = "<network ID>",
Id = "<subnet ID>",
});
return new Dictionary<string, object?>
{
["subnetCidr"] = subnet.Apply(getCloudNetworkPrivateVrackSubnetResult => getCloudNetworkPrivateVrackSubnetResult.Cidr),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.OvhFunctions;
import com.pulumi.ovh.inputs.GetCloudNetworkPrivateVrackSubnetArgs;
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 subnet = OvhFunctions.getCloudNetworkPrivateVrackSubnet(GetCloudNetworkPrivateVrackSubnetArgs.builder()
.serviceName("<public cloud project ID>")
.networkId("<network ID>")
.id("<subnet ID>")
.build());
ctx.export("subnetCidr", subnet.cidr());
}
}
variables:
subnet:
fn::invoke:
function: ovh:getCloudNetworkPrivateVrackSubnet
arguments:
serviceName: <public cloud project ID>
networkId: <network ID>
id: <subnet ID>
outputs:
subnetCidr: ${subnet.cidr}
Example coming soon!
Using getCloudNetworkPrivateVrackSubnet
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 getCloudNetworkPrivateVrackSubnet(args: GetCloudNetworkPrivateVrackSubnetArgs, opts?: InvokeOptions): Promise<GetCloudNetworkPrivateVrackSubnetResult>
function getCloudNetworkPrivateVrackSubnetOutput(args: GetCloudNetworkPrivateVrackSubnetOutputArgs, opts?: InvokeOptions): Output<GetCloudNetworkPrivateVrackSubnetResult>def get_cloud_network_private_vrack_subnet(id: Optional[str] = None,
network_id: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudNetworkPrivateVrackSubnetResult
def get_cloud_network_private_vrack_subnet_output(id: pulumi.Input[Optional[str]] = None,
network_id: pulumi.Input[Optional[str]] = None,
service_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudNetworkPrivateVrackSubnetResult]func LookupCloudNetworkPrivateVrackSubnet(ctx *Context, args *LookupCloudNetworkPrivateVrackSubnetArgs, opts ...InvokeOption) (*LookupCloudNetworkPrivateVrackSubnetResult, error)
func LookupCloudNetworkPrivateVrackSubnetOutput(ctx *Context, args *LookupCloudNetworkPrivateVrackSubnetOutputArgs, opts ...InvokeOption) LookupCloudNetworkPrivateVrackSubnetResultOutput> Note: This function is named LookupCloudNetworkPrivateVrackSubnet in the Go SDK.
public static class GetCloudNetworkPrivateVrackSubnet
{
public static Task<GetCloudNetworkPrivateVrackSubnetResult> InvokeAsync(GetCloudNetworkPrivateVrackSubnetArgs args, InvokeOptions? opts = null)
public static Output<GetCloudNetworkPrivateVrackSubnetResult> Invoke(GetCloudNetworkPrivateVrackSubnetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudNetworkPrivateVrackSubnetResult> getCloudNetworkPrivateVrackSubnet(GetCloudNetworkPrivateVrackSubnetArgs args, InvokeOptions options)
public static Output<GetCloudNetworkPrivateVrackSubnetResult> getCloudNetworkPrivateVrackSubnet(GetCloudNetworkPrivateVrackSubnetArgs args, InvokeOptions options)
fn::invoke:
function: ovh:index/getCloudNetworkPrivateVrackSubnet:getCloudNetworkPrivateVrackSubnet
arguments:
# arguments dictionarydata "ovh_get_cloud_network_private_vrack_subnet" "name" {
# arguments
}The following arguments are supported:
- Id string
- Subnet ID.
- 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.
- Id string
- Subnet ID.
- 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.
- id string
- Subnet ID.
- 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.
- id String
- Subnet ID.
- 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.
- id string
- Subnet ID.
- 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.
- id str
- Subnet ID.
- 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.
- id String
- Subnet ID.
- 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.
getCloudNetworkPrivateVrackSubnet Result
The following output properties are available:
- Allocation
Pools List<GetCloud Network Private Vrack Subnet Allocation Pool> - 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 GetCloud Network Private Vrack Subnet Current State - 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
- Location
Get
Cloud Network Private Vrack Subnet Location - Location details:
- Name string
- Subnet name.
- Network
Id string - Resource
Status string - Subnet readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Service
Name string - Updated
At string - Last update date of the subnet.
- Allocation
Pools []GetCloud Network Private Vrack Subnet Allocation Pool - 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 GetCloud Network Private Vrack Subnet Current State - Current state of the subnet:
- Description string
- Subnet description.
- Dhcp
Enabled bool - Whether DHCP is enabled.
- Dns
Nameservers []string - Configured DNS nameservers.
- Gateway
Ip string - Default gateway IP address.
- Id string
- Location
Get
Cloud Network Private Vrack Subnet Location - Location details:
- Name string
- Subnet name.
- Network
Id string - Resource
Status string - Subnet readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - Service
Name string - Updated
At 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
- location object
- Location details:
- name string
- Subnet name.
- network_
id string - resource_
status string - Subnet readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service_
name string - updated_
at string - Last update date of the subnet.
- allocation
Pools List<GetCloud Network Private Vrack Subnet Allocation Pool> - 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 GetCloud Network Private Vrack Subnet Current State - Current state of the subnet:
- description String
- Subnet description.
- dhcp
Enabled Boolean - Whether DHCP is enabled.
- dns
Nameservers List<String> - Configured DNS nameservers.
- gateway
Ip String - Default gateway IP address.
- id String
- location
Get
Cloud Network Private Vrack Subnet Location - Location details:
- name String
- Subnet name.
- network
Id String - resource
Status String - Subnet readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service
Name String - updated
At String - Last update date of the subnet.
- allocation
Pools GetCloud Network Private Vrack Subnet Allocation Pool[] - 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 GetCloud Network Private Vrack Subnet Current State - Current state of the subnet:
- description string
- Subnet description.
- dhcp
Enabled boolean - Whether DHCP is enabled.
- dns
Nameservers string[] - Configured DNS nameservers.
- gateway
Ip string - Default gateway IP address.
- id string
- location
Get
Cloud Network Private Vrack Subnet Location - Location details:
- name string
- Subnet name.
- network
Id string - resource
Status string - Subnet readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service
Name string - updated
At string - Last update date of the subnet.
- allocation_
pools Sequence[GetCloud Network Private Vrack Subnet Allocation Pool] - 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 GetCloud Network Private Vrack Subnet Current State - 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
- location
Get
Cloud Network Private Vrack Subnet Location - Location details:
- name str
- Subnet name.
- network_
id str - resource_
status str - Subnet readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service_
name str - updated_
at str - Last update date of the subnet.
- allocation
Pools List<Property Map> - 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 Property Map - Current state of the subnet:
- description String
- Subnet description.
- dhcp
Enabled Boolean - Whether DHCP is enabled.
- dns
Nameservers List<String> - Configured DNS nameservers.
- gateway
Ip String - Default gateway IP address.
- id String
- location Property Map
- Location details:
- name String
- Subnet name.
- network
Id String - resource
Status String - Subnet readiness in the system (
CREATING,DELETING,ERROR,OUT_OF_SYNC,READY,UPDATING). - service
Name String - updated
At String - Last update date of the subnet.
Supporting Types
GetCloudNetworkPrivateVrackSubnetAllocationPool
GetCloudNetworkPrivateVrackSubnetCurrentState
- Allocation
Pools List<GetCloud Network Private Vrack Subnet Current State Allocation Pool> - 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<GetCloud Network Private Vrack Subnet Current State Host Route> - Static host routes:
- Location
Get
Cloud Network Private Vrack Subnet Current State Location - Location details:
- Name string
- Subnet name.
- Allocation
Pools []GetCloud Network Private Vrack Subnet Current State Allocation Pool - IP address allocation pools:
- Cidr string
- CIDR address range.
- Description string
- Subnet description.
- Dhcp
Enabled bool - Whether DHCP is enabled.
- Dns
Nameservers []string - Configured DNS nameservers.
- Gateway
Ip string - Default gateway IP address.
- Host
Routes []GetCloud Network Private Vrack Subnet Current State Host Route - Static host routes:
- Location
Get
Cloud Network Private Vrack Subnet Current State Location - 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.
- allocation
Pools List<GetCloud Network Private Vrack Subnet Current State Allocation Pool> - IP address allocation pools:
- cidr String
- CIDR address range.
- description String
- Subnet description.
- dhcp
Enabled Boolean - Whether DHCP is enabled.
- dns
Nameservers List<String> - Configured DNS nameservers.
- gateway
Ip String - Default gateway IP address.
- host
Routes List<GetCloud Network Private Vrack Subnet Current State Host Route> - Static host routes:
- location
Get
Cloud Network Private Vrack Subnet Current State Location - Location details:
- name String
- Subnet name.
- allocation
Pools GetCloud Network Private Vrack Subnet Current State Allocation Pool[] - IP address allocation pools:
- cidr string
- CIDR address range.
- description string
- Subnet description.
- dhcp
Enabled boolean - Whether DHCP is enabled.
- dns
Nameservers string[] - Configured DNS nameservers.
- gateway
Ip string - Default gateway IP address.
- host
Routes GetCloud Network Private Vrack Subnet Current State Host Route[] - Static host routes:
- location
Get
Cloud Network Private Vrack Subnet Current State Location - Location details:
- name string
- Subnet name.
- allocation_
pools Sequence[GetCloud Network Private Vrack Subnet Current State Allocation Pool] - 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[GetCloud Network Private Vrack Subnet Current State Host Route] - Static host routes:
- location
Get
Cloud Network Private Vrack Subnet Current State Location - Location details:
- name str
- Subnet name.
- allocation
Pools List<Property Map> - IP address allocation pools:
- cidr String
- CIDR address range.
- description String
- Subnet description.
- dhcp
Enabled Boolean - Whether DHCP is enabled.
- dns
Nameservers List<String> - Configured DNS nameservers.
- gateway
Ip String - Default gateway IP address.
- host
Routes List<Property Map> - Static host routes:
- location Property Map
- Location details:
- name String
- Subnet name.
GetCloudNetworkPrivateVrackSubnetCurrentStateAllocationPool
GetCloudNetworkPrivateVrackSubnetCurrentStateHostRoute
- Destination string
- Destination CIDR.
- Next
Hop string - Next hop IP address.
- Destination string
- Destination CIDR.
- Next
Hop string - Next hop IP address.
- destination string
- Destination CIDR.
- next_
hop string - Next hop IP address.
- destination String
- Destination CIDR.
- next
Hop String - Next hop IP address.
- destination string
- Destination CIDR.
- next
Hop string - Next hop IP address.
- destination str
- Destination CIDR.
- next_
hop str - Next hop IP address.
- destination String
- Destination CIDR.
- next
Hop String - Next hop IP address.
GetCloudNetworkPrivateVrackSubnetCurrentStateLocation
- 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.
GetCloudNetworkPrivateVrackSubnetLocation
- 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
ovhTerraform Provider.
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
published on Friday, Jul 17, 2026 by OVHcloud