ovh.CloudProject.NetworkPrivateSubnetV2
Explore with Pulumi AI
Creates a subnet in a private network of a public cloud region.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const subnet = new ovh.cloudproject.NetworkPrivateSubnetV2("subnet", {
    cidr: "192.168.168.0/24",
    dhcp: true,
    dnsNameservers: ["1.1.1.1"],
    enableGatewayIp: true,
    networkId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    region: "XXX1",
    serviceName: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    useDefaultPublicDnsResolver: false,
});
import pulumi
import pulumi_ovh as ovh
subnet = ovh.cloud_project.NetworkPrivateSubnetV2("subnet",
    cidr="192.168.168.0/24",
    dhcp=True,
    dns_nameservers=["1.1.1.1"],
    enable_gateway_ip=True,
    network_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    region="XXX1",
    service_name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    use_default_public_dns_resolver=False)
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudproject.NewNetworkPrivateSubnetV2(ctx, "subnet", &cloudproject.NetworkPrivateSubnetV2Args{
			Cidr: pulumi.String("192.168.168.0/24"),
			Dhcp: pulumi.Bool(true),
			DnsNameservers: pulumi.StringArray{
				pulumi.String("1.1.1.1"),
			},
			EnableGatewayIp:             pulumi.Bool(true),
			NetworkId:                   pulumi.String("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
			Region:                      pulumi.String("XXX1"),
			ServiceName:                 pulumi.String("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
			UseDefaultPublicDnsResolver: pulumi.Bool(false),
		})
		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 subnet = new Ovh.CloudProject.NetworkPrivateSubnetV2("subnet", new()
    {
        Cidr = "192.168.168.0/24",
        Dhcp = true,
        DnsNameservers = new[]
        {
            "1.1.1.1",
        },
        EnableGatewayIp = true,
        NetworkId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        Region = "XXX1",
        ServiceName = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        UseDefaultPublicDnsResolver = false,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.NetworkPrivateSubnetV2;
import com.pulumi.ovh.CloudProject.NetworkPrivateSubnetV2Args;
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 subnet = new NetworkPrivateSubnetV2("subnet", NetworkPrivateSubnetV2Args.builder()
            .cidr("192.168.168.0/24")
            .dhcp(true)
            .dnsNameservers("1.1.1.1")
            .enableGatewayIp(true)
            .networkId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
            .region("XXX1")
            .serviceName("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
            .useDefaultPublicDnsResolver(false)
            .build());
    }
}
resources:
  subnet:
    type: ovh:CloudProject:NetworkPrivateSubnetV2
    properties:
      cidr: 192.168.168.0/24
      dhcp: true
      dnsNameservers:
        - 1.1.1.1
      enableGatewayIp: true
      networkId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      region: XXX1
      serviceName: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      useDefaultPublicDnsResolver: false
Create NetworkPrivateSubnetV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkPrivateSubnetV2(name: string, args: NetworkPrivateSubnetV2Args, opts?: CustomResourceOptions);@overload
def NetworkPrivateSubnetV2(resource_name: str,
                           args: NetworkPrivateSubnetV2Args,
                           opts: Optional[ResourceOptions] = None)
@overload
def NetworkPrivateSubnetV2(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[_cloudproject.NetworkPrivateSubnetV2AllocationPoolArgs]] = None,
                           dhcp: Optional[bool] = None,
                           dns_nameservers: Optional[Sequence[str]] = None,
                           enable_gateway_ip: Optional[bool] = None,
                           gateway_ip: Optional[str] = None,
                           host_routes: Optional[Sequence[_cloudproject.NetworkPrivateSubnetV2HostRouteArgs]] = None,
                           name: Optional[str] = None,
                           use_default_public_dns_resolver: Optional[bool] = None)func NewNetworkPrivateSubnetV2(ctx *Context, name string, args NetworkPrivateSubnetV2Args, opts ...ResourceOption) (*NetworkPrivateSubnetV2, error)public NetworkPrivateSubnetV2(string name, NetworkPrivateSubnetV2Args args, CustomResourceOptions? opts = null)
public NetworkPrivateSubnetV2(String name, NetworkPrivateSubnetV2Args args)
public NetworkPrivateSubnetV2(String name, NetworkPrivateSubnetV2Args args, CustomResourceOptions options)
type: ovh:CloudProject:NetworkPrivateSubnetV2
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 NetworkPrivateSubnetV2Args
- 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 NetworkPrivateSubnetV2Args
- 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 NetworkPrivateSubnetV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkPrivateSubnetV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkPrivateSubnetV2Args
- 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 networkPrivateSubnetV2Resource = new Ovh.CloudProject.NetworkPrivateSubnetV2("networkPrivateSubnetV2Resource", new()
{
    Cidr = "string",
    NetworkId = "string",
    Region = "string",
    ServiceName = "string",
    AllocationPools = new[]
    {
        new Ovh.CloudProject.Inputs.NetworkPrivateSubnetV2AllocationPoolArgs
        {
            End = "string",
            Start = "string",
        },
    },
    Dhcp = false,
    DnsNameservers = new[]
    {
        "string",
    },
    EnableGatewayIp = false,
    GatewayIp = "string",
    HostRoutes = new[]
    {
        new Ovh.CloudProject.Inputs.NetworkPrivateSubnetV2HostRouteArgs
        {
            Destination = "string",
            Nexthop = "string",
        },
    },
    Name = "string",
    UseDefaultPublicDnsResolver = false,
});
example, err := CloudProject.NewNetworkPrivateSubnetV2(ctx, "networkPrivateSubnetV2Resource", &CloudProject.NetworkPrivateSubnetV2Args{
	Cidr:        pulumi.String("string"),
	NetworkId:   pulumi.String("string"),
	Region:      pulumi.String("string"),
	ServiceName: pulumi.String("string"),
	AllocationPools: cloudproject.NetworkPrivateSubnetV2AllocationPoolArray{
		&cloudproject.NetworkPrivateSubnetV2AllocationPoolArgs{
			End:   pulumi.String("string"),
			Start: pulumi.String("string"),
		},
	},
	Dhcp: pulumi.Bool(false),
	DnsNameservers: pulumi.StringArray{
		pulumi.String("string"),
	},
	EnableGatewayIp: pulumi.Bool(false),
	GatewayIp:       pulumi.String("string"),
	HostRoutes: cloudproject.NetworkPrivateSubnetV2HostRouteArray{
		&cloudproject.NetworkPrivateSubnetV2HostRouteArgs{
			Destination: pulumi.String("string"),
			Nexthop:     pulumi.String("string"),
		},
	},
	Name:                        pulumi.String("string"),
	UseDefaultPublicDnsResolver: pulumi.Bool(false),
})
var networkPrivateSubnetV2Resource = new NetworkPrivateSubnetV2("networkPrivateSubnetV2Resource", NetworkPrivateSubnetV2Args.builder()
    .cidr("string")
    .networkId("string")
    .region("string")
    .serviceName("string")
    .allocationPools(NetworkPrivateSubnetV2AllocationPoolArgs.builder()
        .end("string")
        .start("string")
        .build())
    .dhcp(false)
    .dnsNameservers("string")
    .enableGatewayIp(false)
    .gatewayIp("string")
    .hostRoutes(NetworkPrivateSubnetV2HostRouteArgs.builder()
        .destination("string")
        .nexthop("string")
        .build())
    .name("string")
    .useDefaultPublicDnsResolver(false)
    .build());
network_private_subnet_v2_resource = ovh.cloud_project.NetworkPrivateSubnetV2("networkPrivateSubnetV2Resource",
    cidr="string",
    network_id="string",
    region="string",
    service_name="string",
    allocation_pools=[{
        "end": "string",
        "start": "string",
    }],
    dhcp=False,
    dns_nameservers=["string"],
    enable_gateway_ip=False,
    gateway_ip="string",
    host_routes=[{
        "destination": "string",
        "nexthop": "string",
    }],
    name="string",
    use_default_public_dns_resolver=False)
const networkPrivateSubnetV2Resource = new ovh.cloudproject.NetworkPrivateSubnetV2("networkPrivateSubnetV2Resource", {
    cidr: "string",
    networkId: "string",
    region: "string",
    serviceName: "string",
    allocationPools: [{
        end: "string",
        start: "string",
    }],
    dhcp: false,
    dnsNameservers: ["string"],
    enableGatewayIp: false,
    gatewayIp: "string",
    hostRoutes: [{
        destination: "string",
        nexthop: "string",
    }],
    name: "string",
    useDefaultPublicDnsResolver: false,
});
type: ovh:CloudProject:NetworkPrivateSubnetV2
properties:
    allocationPools:
        - end: string
          start: string
    cidr: string
    dhcp: false
    dnsNameservers:
        - string
    enableGatewayIp: false
    gatewayIp: string
    hostRoutes:
        - destination: string
          nexthop: string
    name: string
    networkId: string
    region: string
    serviceName: string
    useDefaultPublicDnsResolver: false
NetworkPrivateSubnetV2 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 NetworkPrivateSubnetV2 resource accepts the following input properties:
- Cidr string
- IP range of the subnet Changing this value recreates the subnet.
- NetworkId string
- The id of the network. Changing this forces a new resource to be created.
- Region string
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- ServiceName string
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- AllocationPools List<NetworkPrivate Subnet V2Allocation Pool> 
- List of IP allocation pools Changing this value recreates the resource.
- Dhcp bool
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- DnsNameservers List<string>
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- EnableGateway boolIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- GatewayIp string
- See Argument Reference above.
- HostRoutes List<NetworkPrivate Subnet V2Host Route> 
- Static host routes of subnet
- Name string
- Name of the subnet Changing this value recreates the subnet.
- UseDefault boolPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- Cidr string
- IP range of the subnet Changing this value recreates the subnet.
- NetworkId string
- The id of the network. Changing this forces a new resource to be created.
- Region string
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- ServiceName string
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- AllocationPools []NetworkPrivate Subnet V2Allocation Pool Args 
- List of IP allocation pools Changing this value recreates the resource.
- Dhcp bool
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- DnsNameservers []string
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- EnableGateway boolIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- GatewayIp string
- See Argument Reference above.
- HostRoutes []NetworkPrivate Subnet V2Host Route Args 
- Static host routes of subnet
- Name string
- Name of the subnet Changing this value recreates the subnet.
- UseDefault boolPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- cidr String
- IP range of the subnet Changing this value recreates the subnet.
- networkId String
- The id of the network. Changing this forces a new resource to be created.
- region String
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- serviceName String
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- allocationPools List<NetworkPrivate Subnet V2Allocation Pool> 
- List of IP allocation pools Changing this value recreates the resource.
- dhcp Boolean
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dnsNameservers List<String>
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enableGateway BooleanIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gatewayIp String
- See Argument Reference above.
- hostRoutes List<NetworkPrivate Subnet V2Host Route> 
- Static host routes of subnet
- name String
- Name of the subnet Changing this value recreates the subnet.
- useDefault BooleanPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- cidr string
- IP range of the subnet Changing this value recreates the subnet.
- networkId string
- The id of the network. Changing this forces a new resource to be created.
- region string
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- serviceName string
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- allocationPools NetworkPrivate Subnet V2Allocation Pool[] 
- List of IP allocation pools Changing this value recreates the resource.
- dhcp boolean
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dnsNameservers string[]
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enableGateway booleanIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gatewayIp string
- See Argument Reference above.
- hostRoutes NetworkPrivate Subnet V2Host Route[] 
- Static host routes of subnet
- name string
- Name of the subnet Changing this value recreates the subnet.
- useDefault booleanPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- cidr str
- IP range of the subnet Changing this value recreates the subnet.
- network_id str
- The id of the network. Changing this forces a new resource to be created.
- region str
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- service_name str
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- allocation_pools Sequence[cloudproject.Network Private Subnet V2Allocation Pool Args] 
- List of IP allocation pools Changing this value recreates the resource.
- dhcp bool
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dns_nameservers Sequence[str]
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enable_gateway_ boolip 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gateway_ip str
- See Argument Reference above.
- host_routes Sequence[cloudproject.Network Private Subnet V2Host Route Args] 
- Static host routes of subnet
- name str
- Name of the subnet Changing this value recreates the subnet.
- use_default_ boolpublic_ dns_ resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- cidr String
- IP range of the subnet Changing this value recreates the subnet.
- networkId String
- The id of the network. Changing this forces a new resource to be created.
- region String
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- serviceName String
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- allocationPools List<Property Map>
- List of IP allocation pools Changing this value recreates the resource.
- dhcp Boolean
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dnsNameservers List<String>
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enableGateway BooleanIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gatewayIp String
- See Argument Reference above.
- hostRoutes List<Property Map>
- Static host routes of subnet
- name String
- Name of the subnet Changing this value recreates the subnet.
- useDefault BooleanPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkPrivateSubnetV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NetworkPrivateSubnetV2 Resource
Get an existing NetworkPrivateSubnetV2 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?: NetworkPrivateSubnetV2State, opts?: CustomResourceOptions): NetworkPrivateSubnetV2@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allocation_pools: Optional[Sequence[_cloudproject.NetworkPrivateSubnetV2AllocationPoolArgs]] = None,
        cidr: Optional[str] = None,
        dhcp: Optional[bool] = None,
        dns_nameservers: Optional[Sequence[str]] = None,
        enable_gateway_ip: Optional[bool] = None,
        gateway_ip: Optional[str] = None,
        host_routes: Optional[Sequence[_cloudproject.NetworkPrivateSubnetV2HostRouteArgs]] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        region: Optional[str] = None,
        service_name: Optional[str] = None,
        use_default_public_dns_resolver: Optional[bool] = None) -> NetworkPrivateSubnetV2func GetNetworkPrivateSubnetV2(ctx *Context, name string, id IDInput, state *NetworkPrivateSubnetV2State, opts ...ResourceOption) (*NetworkPrivateSubnetV2, error)public static NetworkPrivateSubnetV2 Get(string name, Input<string> id, NetworkPrivateSubnetV2State? state, CustomResourceOptions? opts = null)public static NetworkPrivateSubnetV2 get(String name, Output<String> id, NetworkPrivateSubnetV2State state, CustomResourceOptions options)resources:  _:    type: ovh:CloudProject:NetworkPrivateSubnetV2    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.
- AllocationPools List<NetworkPrivate Subnet V2Allocation Pool> 
- List of IP allocation pools Changing this value recreates the resource.
- Cidr string
- IP range of the subnet Changing this value recreates the subnet.
- Dhcp bool
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- DnsNameservers List<string>
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- EnableGateway boolIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- GatewayIp string
- See Argument Reference above.
- HostRoutes List<NetworkPrivate Subnet V2Host Route> 
- Static host routes of subnet
- Name string
- Name of the subnet Changing this value recreates the subnet.
- NetworkId string
- The id of the network. Changing this forces a new resource to be created.
- Region string
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- ServiceName string
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- UseDefault boolPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- AllocationPools []NetworkPrivate Subnet V2Allocation Pool Args 
- List of IP allocation pools Changing this value recreates the resource.
- Cidr string
- IP range of the subnet Changing this value recreates the subnet.
- Dhcp bool
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- DnsNameservers []string
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- EnableGateway boolIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- GatewayIp string
- See Argument Reference above.
- HostRoutes []NetworkPrivate Subnet V2Host Route Args 
- Static host routes of subnet
- Name string
- Name of the subnet Changing this value recreates the subnet.
- NetworkId string
- The id of the network. Changing this forces a new resource to be created.
- Region string
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- ServiceName string
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- UseDefault boolPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- allocationPools List<NetworkPrivate Subnet V2Allocation Pool> 
- List of IP allocation pools Changing this value recreates the resource.
- cidr String
- IP range of the subnet Changing this value recreates the subnet.
- dhcp Boolean
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dnsNameservers List<String>
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enableGateway BooleanIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gatewayIp String
- See Argument Reference above.
- hostRoutes List<NetworkPrivate Subnet V2Host Route> 
- Static host routes of subnet
- name String
- Name of the subnet Changing this value recreates the subnet.
- networkId String
- The id of the network. Changing this forces a new resource to be created.
- region String
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- serviceName String
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- useDefault BooleanPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- allocationPools NetworkPrivate Subnet V2Allocation Pool[] 
- List of IP allocation pools Changing this value recreates the resource.
- cidr string
- IP range of the subnet Changing this value recreates the subnet.
- dhcp boolean
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dnsNameservers string[]
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enableGateway booleanIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gatewayIp string
- See Argument Reference above.
- hostRoutes NetworkPrivate Subnet V2Host Route[] 
- Static host routes of subnet
- name string
- Name of the subnet Changing this value recreates the subnet.
- networkId string
- The id of the network. Changing this forces a new resource to be created.
- region string
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- serviceName string
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- useDefault booleanPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- allocation_pools Sequence[cloudproject.Network Private Subnet V2Allocation Pool Args] 
- List of IP allocation pools Changing this value recreates the resource.
- cidr str
- IP range of the subnet Changing this value recreates the subnet.
- dhcp bool
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dns_nameservers Sequence[str]
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enable_gateway_ boolip 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gateway_ip str
- See Argument Reference above.
- host_routes Sequence[cloudproject.Network Private Subnet V2Host Route Args] 
- Static host routes of subnet
- name str
- Name of the subnet Changing this value recreates the subnet.
- network_id str
- The id of the network. Changing this forces a new resource to be created.
- region str
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- service_name str
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- use_default_ boolpublic_ dns_ resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
- allocationPools List<Property Map>
- List of IP allocation pools Changing this value recreates the resource.
- cidr String
- IP range of the subnet Changing this value recreates the subnet.
- dhcp Boolean
- Enable DHCP. Changing this forces a new resource to be created. Defaults to true.
- dnsNameservers List<String>
- DNS nameservers used by DHCP Changing this value recreates the resource. Defaults to OVH default DNS nameserver.
- enableGateway BooleanIp 
- Set to true if you want to set a default gateway IP. Changing this value recreates the resource. Defaults to true.
- gatewayIp String
- See Argument Reference above.
- hostRoutes List<Property Map>
- Static host routes of subnet
- name String
- Name of the subnet Changing this value recreates the subnet.
- networkId String
- The id of the network. Changing this forces a new resource to be created.
- region String
- The region in which the network subnet will be created. Ex.: "GRA1". Changing this value recreates the resource.
- serviceName String
- The id of the public cloud project. If omitted,
the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- useDefault BooleanPublic Dns Resolver 
- Set to false if you want to use your DNS resolver. Changing this value recreates the resource.
Supporting Types
NetworkPrivateSubnetV2AllocationPool, NetworkPrivateSubnetV2AllocationPoolArgs          
NetworkPrivateSubnetV2HostRoute, NetworkPrivateSubnetV2HostRouteArgs          
- Destination string
- Nexthop string
- Destination string
- Nexthop string
- destination String
- nexthop String
- destination string
- nexthop string
- destination str
- nexthop str
- destination String
- nexthop String
Import
Subnet in a private network of a public cloud project can be imported using the service_name, region, network_id and subnet_id, separated by “/” E.g.,
bash
$ pulumi import ovh:CloudProject/networkPrivateSubnetV2:NetworkPrivateSubnetV2 mysubnet 5ceb661434891538b54a4f2c66fc4b746e/BHS5/25807101-8aaa-4ea5-b507-61f0d661b101/0f0b73a4-403b-45e4-86d0-b438f1291909
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 ovhTerraform Provider.