1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. NetworkPrivateSubnetV2
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.CloudProject.NetworkPrivateSubnetV2

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    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",
    });
    
    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")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/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"),
    		})
    		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",
        });
    
    });
    
    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")
                .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
    

    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)
    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",
    });
    
    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"),
    })
    
    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")
        .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")
    
    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",
    });
    
    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
    

    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_SERVICE environment variable is used.
    AllocationPools List<NetworkPrivateSubnetV2AllocationPool>
    DHCP allocation pools of 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.
    EnableGatewayIp bool
    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<NetworkPrivateSubnetV2HostRoute>
    Static host routes of subnet
    Name string
    Name of the subnet Changing this value recreates the subnet.
    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_SERVICE environment variable is used.
    AllocationPools []NetworkPrivateSubnetV2AllocationPoolArgs
    DHCP allocation pools of 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.
    EnableGatewayIp bool
    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 []NetworkPrivateSubnetV2HostRouteArgs
    Static host routes of subnet
    Name string
    Name of the subnet Changing this value recreates the subnet.
    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_SERVICE environment variable is used.
    allocationPools List<NetworkPrivateSubnetV2AllocationPool>
    DHCP allocation pools of 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.
    enableGatewayIp Boolean
    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<NetworkPrivateSubnetV2HostRoute>
    Static host routes of subnet
    name String
    Name of the subnet Changing this value recreates the subnet.
    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_SERVICE environment variable is used.
    allocationPools NetworkPrivateSubnetV2AllocationPool[]
    DHCP allocation pools of 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.
    enableGatewayIp boolean
    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 NetworkPrivateSubnetV2HostRoute[]
    Static host routes of subnet
    name string
    Name of the subnet Changing this value recreates the subnet.
    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_SERVICE environment variable is used.
    allocation_pools Sequence[cloudproject.NetworkPrivateSubnetV2AllocationPoolArgs]
    DHCP allocation pools of 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_ip bool
    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.NetworkPrivateSubnetV2HostRouteArgs]
    Static host routes of subnet
    name str
    Name of the subnet Changing this value recreates the subnet.
    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_SERVICE environment variable is used.
    allocationPools List<Property Map>
    DHCP allocation pools of 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.
    enableGatewayIp Boolean
    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.

    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) -> NetworkPrivateSubnetV2
    func 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)
    Resource lookup is not supported in YAML
    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<NetworkPrivateSubnetV2AllocationPool>
    DHCP allocation pools of subnet
    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.
    EnableGatewayIp bool
    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<NetworkPrivateSubnetV2HostRoute>
    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_SERVICE environment variable is used.
    AllocationPools []NetworkPrivateSubnetV2AllocationPoolArgs
    DHCP allocation pools of subnet
    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.
    EnableGatewayIp bool
    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 []NetworkPrivateSubnetV2HostRouteArgs
    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_SERVICE environment variable is used.
    allocationPools List<NetworkPrivateSubnetV2AllocationPool>
    DHCP allocation pools of subnet
    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.
    enableGatewayIp Boolean
    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<NetworkPrivateSubnetV2HostRoute>
    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_SERVICE environment variable is used.
    allocationPools NetworkPrivateSubnetV2AllocationPool[]
    DHCP allocation pools of subnet
    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.
    enableGatewayIp boolean
    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 NetworkPrivateSubnetV2HostRoute[]
    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_SERVICE environment variable is used.
    allocation_pools Sequence[cloudproject.NetworkPrivateSubnetV2AllocationPoolArgs]
    DHCP allocation pools of subnet
    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_ip bool
    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.NetworkPrivateSubnetV2HostRouteArgs]
    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_SERVICE environment variable is used.
    allocationPools List<Property Map>
    DHCP allocation pools of subnet
    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.
    enableGatewayIp Boolean
    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_SERVICE environment variable is used.

    Supporting Types

    NetworkPrivateSubnetV2AllocationPool, NetworkPrivateSubnetV2AllocationPoolArgs

    End string
    Start string
    End string
    Start string
    end String
    start String
    end string
    start string
    end str
    start str
    end String
    start String

    NetworkPrivateSubnetV2HostRoute, NetworkPrivateSubnetV2HostRouteArgs

    Destination string
    Nexthop string
    Destination string
    Nexthop string
    destination String
    nexthop String
    destination string
    nexthop string
    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 ovh Terraform Provider.
    ovh logo
    OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud