1. Registry
  2. Packages
  3. Selectel Provider
  4. API Docs
  5. VpcNetworkSubnetV2
Viewing docs for selectel 9.5.0
published on Friday, Oct 30, 2026 by selectel
selectel
Viewing docs for selectel 9.5.0
published on Friday, Oct 30, 2026 by selectel

    Creates and manages a subnet of a private network using the v2 public API. For more information about private networks and subnets, see the official Selectel documentation.

    If you are upgrading from a version earlier than 9.1.0, follow the upgrade guide to migrate your resources from the OpenStack provider.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const subnet1 = new selectel.VpcNetworkSubnetV2("subnet_1", {
        projectId: project1.id,
        region: "ru-6",
        networkId: network1.id,
        cidr: "192.168.199.0/24",
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    subnet1 = selectel.VpcNetworkSubnetV2("subnet_1",
        project_id=project1["id"],
        region="ru-6",
        network_id=network1["id"],
        cidr="192.168.199.0/24")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v9/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewVpcNetworkSubnetV2(ctx, "subnet_1", &selectel.VpcNetworkSubnetV2Args{
    			ProjectId: pulumi.Any(project1.Id),
    			Region:    pulumi.String("ru-6"),
    			NetworkId: pulumi.Any(network1.Id),
    			Cidr:      pulumi.String("192.168.199.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var subnet1 = new Selectel.VpcNetworkSubnetV2("subnet_1", new()
        {
            ProjectId = project1.Id,
            Region = "ru-6",
            NetworkId = network1.Id,
            Cidr = "192.168.199.0/24",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.VpcNetworkSubnetV2;
    import com.pulumi.selectel.VpcNetworkSubnetV2Args;
    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 subnet1 = new VpcNetworkSubnetV2("subnet1", VpcNetworkSubnetV2Args.builder()
                .projectId(project1.id())
                .region("ru-6")
                .networkId(network1.id())
                .cidr("192.168.199.0/24")
                .build());
    
        }
    }
    
    resources:
      subnet1:
        type: selectel:VpcNetworkSubnetV2
        name: subnet_1
        properties:
          projectId: ${project1.id}
          region: ru-6
          networkId: ${network1.id}
          cidr: 192.168.199.0/24
    
    Example coming soon!
    

    Create VpcNetworkSubnetV2 Resource

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

    Constructor syntax

    new VpcNetworkSubnetV2(name: string, args: VpcNetworkSubnetV2Args, opts?: CustomResourceOptions);
    @overload
    def VpcNetworkSubnetV2(resource_name: str,
                           args: VpcNetworkSubnetV2Args,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcNetworkSubnetV2(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           network_id: Optional[str] = None,
                           cidr: Optional[str] = None,
                           region: Optional[str] = None,
                           project_id: Optional[str] = None,
                           enable_dhcp: Optional[bool] = None,
                           gateway_ip: Optional[str] = None,
                           ip_version: Optional[float] = None,
                           ipv6_address_mode: Optional[str] = None,
                           ipv6_ra_mode: Optional[str] = None,
                           name: Optional[str] = None,
                           allocation_pools: Optional[Sequence[VpcNetworkSubnetV2AllocationPoolArgs]] = None,
                           no_gateway: Optional[bool] = None,
                           dns_nameservers: Optional[Sequence[str]] = None,
                           description: Optional[str] = None,
                           tags: Optional[Sequence[str]] = None,
                           timeouts: Optional[VpcNetworkSubnetV2TimeoutsArgs] = None)
    func NewVpcNetworkSubnetV2(ctx *Context, name string, args VpcNetworkSubnetV2Args, opts ...ResourceOption) (*VpcNetworkSubnetV2, error)
    public VpcNetworkSubnetV2(string name, VpcNetworkSubnetV2Args args, CustomResourceOptions? opts = null)
    public VpcNetworkSubnetV2(String name, VpcNetworkSubnetV2Args args)
    public VpcNetworkSubnetV2(String name, VpcNetworkSubnetV2Args args, CustomResourceOptions options)
    
    type: selectel:VpcNetworkSubnetV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "selectel_vpc_network_subnet_v2" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VpcNetworkSubnetV2Args
    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 VpcNetworkSubnetV2Args
    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 VpcNetworkSubnetV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcNetworkSubnetV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcNetworkSubnetV2Args
    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 vpcNetworkSubnetV2Resource = new Selectel.VpcNetworkSubnetV2("vpcNetworkSubnetV2Resource", new()
    {
        NetworkId = "string",
        Cidr = "string",
        Region = "string",
        ProjectId = "string",
        EnableDhcp = false,
        GatewayIp = "string",
        IpVersion = 0.0,
        Ipv6AddressMode = "string",
        Ipv6RaMode = "string",
        Name = "string",
        AllocationPools = new[]
        {
            new Selectel.Inputs.VpcNetworkSubnetV2AllocationPoolArgs
            {
                End = "string",
                Start = "string",
            },
        },
        NoGateway = false,
        DnsNameservers = new[]
        {
            "string",
        },
        Description = "string",
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Selectel.Inputs.VpcNetworkSubnetV2TimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := selectel.NewVpcNetworkSubnetV2(ctx, "vpcNetworkSubnetV2Resource", &selectel.VpcNetworkSubnetV2Args{
    	NetworkId:       pulumi.String("string"),
    	Cidr:            pulumi.String("string"),
    	Region:          pulumi.String("string"),
    	ProjectId:       pulumi.String("string"),
    	EnableDhcp:      pulumi.Bool(false),
    	GatewayIp:       pulumi.String("string"),
    	IpVersion:       pulumi.Float64(0),
    	Ipv6AddressMode: pulumi.String("string"),
    	Ipv6RaMode:      pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	AllocationPools: selectel.VpcNetworkSubnetV2AllocationPoolArray{
    		&selectel.VpcNetworkSubnetV2AllocationPoolArgs{
    			End:   pulumi.String("string"),
    			Start: pulumi.String("string"),
    		},
    	},
    	NoGateway: pulumi.Bool(false),
    	DnsNameservers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &selectel.VpcNetworkSubnetV2TimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    resource "selectel_vpc_network_subnet_v2" "vpcNetworkSubnetV2Resource" {
      lifecycle {
        create_before_destroy = true
      }
      network_id        = "string"
      cidr              = "string"
      region            = "string"
      project_id        = "string"
      enable_dhcp       = false
      gateway_ip        = "string"
      ip_version        = 0
      ipv6_address_mode = "string"
      ipv6_ra_mode      = "string"
      name              = "string"
      allocation_pools {
        end   = "string"
        start = "string"
      }
      no_gateway      = false
      dns_nameservers = ["string"]
      description     = "string"
      tags            = ["string"]
      timeouts = {
        delete = "string"
      }
    }
    
    var vpcNetworkSubnetV2Resource = new VpcNetworkSubnetV2("vpcNetworkSubnetV2Resource", VpcNetworkSubnetV2Args.builder()
        .networkId("string")
        .cidr("string")
        .region("string")
        .projectId("string")
        .enableDhcp(false)
        .gatewayIp("string")
        .ipVersion(0.0)
        .ipv6AddressMode("string")
        .ipv6RaMode("string")
        .name("string")
        .allocationPools(VpcNetworkSubnetV2AllocationPoolArgs.builder()
            .end("string")
            .start("string")
            .build())
        .noGateway(false)
        .dnsNameservers("string")
        .description("string")
        .tags("string")
        .timeouts(VpcNetworkSubnetV2TimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    vpc_network_subnet_v2_resource = selectel.VpcNetworkSubnetV2("vpcNetworkSubnetV2Resource",
        network_id="string",
        cidr="string",
        region="string",
        project_id="string",
        enable_dhcp=False,
        gateway_ip="string",
        ip_version=float(0),
        ipv6_address_mode="string",
        ipv6_ra_mode="string",
        name="string",
        allocation_pools=[{
            "end": "string",
            "start": "string",
        }],
        no_gateway=False,
        dns_nameservers=["string"],
        description="string",
        tags=["string"],
        timeouts={
            "delete": "string",
        })
    
    const vpcNetworkSubnetV2Resource = new selectel.VpcNetworkSubnetV2("vpcNetworkSubnetV2Resource", {
        networkId: "string",
        cidr: "string",
        region: "string",
        projectId: "string",
        enableDhcp: false,
        gatewayIp: "string",
        ipVersion: 0,
        ipv6AddressMode: "string",
        ipv6RaMode: "string",
        name: "string",
        allocationPools: [{
            end: "string",
            start: "string",
        }],
        noGateway: false,
        dnsNameservers: ["string"],
        description: "string",
        tags: ["string"],
        timeouts: {
            "delete": "string",
        },
    });
    
    type: selectel:VpcNetworkSubnetV2
    properties:
        allocationPools:
            - end: string
              start: string
        cidr: string
        description: string
        dnsNameservers:
            - string
        enableDhcp: false
        gatewayIp: string
        ipVersion: 0
        ipv6AddressMode: string
        ipv6RaMode: string
        name: string
        networkId: string
        noGateway: false
        projectId: string
        region: string
        tags:
            - string
        timeouts:
            delete: string
    

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

    Cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    NetworkId string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    Region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    AllocationPools List<VpcNetworkSubnetV2AllocationPool>
    Allocation pools of the subnet.
    Description string
    Description of the subnet.
    DnsNameservers List<string>
    DNS nameservers of the subnet, for example, 188.93.16.19.
    EnableDhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    GatewayIp string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    IpVersion double
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    Ipv6AddressMode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Ipv6RaMode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Name string
    Name of the subnet.
    NoGateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    Tags List<string>
    Tags of the subnet.
    Timeouts VpcNetworkSubnetV2Timeouts
    Cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    NetworkId string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    Region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    AllocationPools []VpcNetworkSubnetV2AllocationPoolArgs
    Allocation pools of the subnet.
    Description string
    Description of the subnet.
    DnsNameservers []string
    DNS nameservers of the subnet, for example, 188.93.16.19.
    EnableDhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    GatewayIp string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    IpVersion float64
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    Ipv6AddressMode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Ipv6RaMode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Name string
    Name of the subnet.
    NoGateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    Tags []string
    Tags of the subnet.
    Timeouts VpcNetworkSubnetV2TimeoutsArgs
    cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    network_id string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    project_id string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    allocation_pools list(object)
    Allocation pools of the subnet.
    description string
    Description of the subnet.
    dns_nameservers list(string)
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enable_dhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gateway_ip string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    ip_version number
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6_address_mode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6_ra_mode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name string
    Name of the subnet.
    no_gateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    tags list(string)
    Tags of the subnet.
    timeouts object
    cidr String
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    networkId String
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region String
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    allocationPools List<VpcNetworkSubnetV2AllocationPool>
    Allocation pools of the subnet.
    description String
    Description of the subnet.
    dnsNameservers List<String>
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enableDhcp Boolean
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gatewayIp String
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    ipVersion Double
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6AddressMode String
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6RaMode String
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name String
    Name of the subnet.
    noGateway Boolean
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    tags List<String>
    Tags of the subnet.
    timeouts VpcNetworkSubnetV2Timeouts
    cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    networkId string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    projectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    allocationPools VpcNetworkSubnetV2AllocationPool[]
    Allocation pools of the subnet.
    description string
    Description of the subnet.
    dnsNameservers string[]
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enableDhcp boolean
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gatewayIp string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    ipVersion number
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6AddressMode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6RaMode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name string
    Name of the subnet.
    noGateway boolean
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    tags string[]
    Tags of the subnet.
    timeouts VpcNetworkSubnetV2Timeouts
    cidr str
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    network_id str
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    project_id str
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region str
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    allocation_pools Sequence[VpcNetworkSubnetV2AllocationPoolArgs]
    Allocation pools of the subnet.
    description str
    Description of the subnet.
    dns_nameservers Sequence[str]
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enable_dhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gateway_ip str
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    ip_version float
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6_address_mode str
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6_ra_mode str
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name str
    Name of the subnet.
    no_gateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    tags Sequence[str]
    Tags of the subnet.
    timeouts VpcNetworkSubnetV2TimeoutsArgs
    cidr String
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    networkId String
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region String
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    allocationPools List<Property Map>
    Allocation pools of the subnet.
    description String
    Description of the subnet.
    dnsNameservers List<String>
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enableDhcp Boolean
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gatewayIp String
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    ipVersion Number
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6AddressMode String
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6RaMode String
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name String
    Name of the subnet.
    noGateway Boolean
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    tags List<String>
    Tags of the subnet.
    timeouts Property Map

    Outputs

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

    AllTags List<string>
    All tags of the subnet.
    Blocked bool
    Specifies if the subnet is administratively blocked.
    HostRoutes List<VpcNetworkSubnetV2HostRoute>
    Host routes of the subnet.
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceTypes List<string>
    Service types of the subnet.
    AllTags []string
    All tags of the subnet.
    Blocked bool
    Specifies if the subnet is administratively blocked.
    HostRoutes []VpcNetworkSubnetV2HostRoute
    Host routes of the subnet.
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceTypes []string
    Service types of the subnet.
    all_tags list(string)
    All tags of the subnet.
    blocked bool
    Specifies if the subnet is administratively blocked.
    host_routes list(object)
    Host routes of the subnet.
    id string
    The provider-assigned unique ID for this managed resource.
    service_types list(string)
    Service types of the subnet.
    allTags List<String>
    All tags of the subnet.
    blocked Boolean
    Specifies if the subnet is administratively blocked.
    hostRoutes List<VpcNetworkSubnetV2HostRoute>
    Host routes of the subnet.
    id String
    The provider-assigned unique ID for this managed resource.
    serviceTypes List<String>
    Service types of the subnet.
    allTags string[]
    All tags of the subnet.
    blocked boolean
    Specifies if the subnet is administratively blocked.
    hostRoutes VpcNetworkSubnetV2HostRoute[]
    Host routes of the subnet.
    id string
    The provider-assigned unique ID for this managed resource.
    serviceTypes string[]
    Service types of the subnet.
    all_tags Sequence[str]
    All tags of the subnet.
    blocked bool
    Specifies if the subnet is administratively blocked.
    host_routes Sequence[VpcNetworkSubnetV2HostRoute]
    Host routes of the subnet.
    id str
    The provider-assigned unique ID for this managed resource.
    service_types Sequence[str]
    Service types of the subnet.
    allTags List<String>
    All tags of the subnet.
    blocked Boolean
    Specifies if the subnet is administratively blocked.
    hostRoutes List<Property Map>
    Host routes of the subnet.
    id String
    The provider-assigned unique ID for this managed resource.
    serviceTypes List<String>
    Service types of the subnet.

    Look up Existing VpcNetworkSubnetV2 Resource

    Get an existing VpcNetworkSubnetV2 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?: VpcNetworkSubnetV2State, opts?: CustomResourceOptions): VpcNetworkSubnetV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            all_tags: Optional[Sequence[str]] = None,
            allocation_pools: Optional[Sequence[VpcNetworkSubnetV2AllocationPoolArgs]] = None,
            blocked: Optional[bool] = None,
            cidr: Optional[str] = None,
            description: Optional[str] = None,
            dns_nameservers: Optional[Sequence[str]] = None,
            enable_dhcp: Optional[bool] = None,
            gateway_ip: Optional[str] = None,
            host_routes: Optional[Sequence[VpcNetworkSubnetV2HostRouteArgs]] = None,
            ip_version: Optional[float] = None,
            ipv6_address_mode: Optional[str] = None,
            ipv6_ra_mode: Optional[str] = None,
            name: Optional[str] = None,
            network_id: Optional[str] = None,
            no_gateway: Optional[bool] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            service_types: Optional[Sequence[str]] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[VpcNetworkSubnetV2TimeoutsArgs] = None) -> VpcNetworkSubnetV2
    func GetVpcNetworkSubnetV2(ctx *Context, name string, id IDInput, state *VpcNetworkSubnetV2State, opts ...ResourceOption) (*VpcNetworkSubnetV2, error)
    public static VpcNetworkSubnetV2 Get(string name, Input<string> id, VpcNetworkSubnetV2State? state, CustomResourceOptions? opts = null)
    public static VpcNetworkSubnetV2 get(String name, Output<String> id, VpcNetworkSubnetV2State state, CustomResourceOptions options)
    resources:  _:    type: selectel:VpcNetworkSubnetV2    get:      id: ${id}
    import {
      to = selectel_vpc_network_subnet_v2.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AllTags List<string>
    All tags of the subnet.
    AllocationPools List<VpcNetworkSubnetV2AllocationPool>
    Allocation pools of the subnet.
    Blocked bool
    Specifies if the subnet is administratively blocked.
    Cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    Description string
    Description of the subnet.
    DnsNameservers List<string>
    DNS nameservers of the subnet, for example, 188.93.16.19.
    EnableDhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    GatewayIp string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    HostRoutes List<VpcNetworkSubnetV2HostRoute>
    Host routes of the subnet.
    IpVersion double
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    Ipv6AddressMode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Ipv6RaMode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Name string
    Name of the subnet.
    NetworkId string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    NoGateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    Region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    ServiceTypes List<string>
    Service types of the subnet.
    Tags List<string>
    Tags of the subnet.
    Timeouts VpcNetworkSubnetV2Timeouts
    AllTags []string
    All tags of the subnet.
    AllocationPools []VpcNetworkSubnetV2AllocationPoolArgs
    Allocation pools of the subnet.
    Blocked bool
    Specifies if the subnet is administratively blocked.
    Cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    Description string
    Description of the subnet.
    DnsNameservers []string
    DNS nameservers of the subnet, for example, 188.93.16.19.
    EnableDhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    GatewayIp string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    HostRoutes []VpcNetworkSubnetV2HostRouteArgs
    Host routes of the subnet.
    IpVersion float64
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    Ipv6AddressMode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Ipv6RaMode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    Name string
    Name of the subnet.
    NetworkId string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    NoGateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    Region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    ServiceTypes []string
    Service types of the subnet.
    Tags []string
    Tags of the subnet.
    Timeouts VpcNetworkSubnetV2TimeoutsArgs
    all_tags list(string)
    All tags of the subnet.
    allocation_pools list(object)
    Allocation pools of the subnet.
    blocked bool
    Specifies if the subnet is administratively blocked.
    cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    description string
    Description of the subnet.
    dns_nameservers list(string)
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enable_dhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gateway_ip string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    host_routes list(object)
    Host routes of the subnet.
    ip_version number
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6_address_mode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6_ra_mode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name string
    Name of the subnet.
    network_id string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    no_gateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    project_id string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    service_types list(string)
    Service types of the subnet.
    tags list(string)
    Tags of the subnet.
    timeouts object
    allTags List<String>
    All tags of the subnet.
    allocationPools List<VpcNetworkSubnetV2AllocationPool>
    Allocation pools of the subnet.
    blocked Boolean
    Specifies if the subnet is administratively blocked.
    cidr String
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    description String
    Description of the subnet.
    dnsNameservers List<String>
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enableDhcp Boolean
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gatewayIp String
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    hostRoutes List<VpcNetworkSubnetV2HostRoute>
    Host routes of the subnet.
    ipVersion Double
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6AddressMode String
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6RaMode String
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name String
    Name of the subnet.
    networkId String
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    noGateway Boolean
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region String
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    serviceTypes List<String>
    Service types of the subnet.
    tags List<String>
    Tags of the subnet.
    timeouts VpcNetworkSubnetV2Timeouts
    allTags string[]
    All tags of the subnet.
    allocationPools VpcNetworkSubnetV2AllocationPool[]
    Allocation pools of the subnet.
    blocked boolean
    Specifies if the subnet is administratively blocked.
    cidr string
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    description string
    Description of the subnet.
    dnsNameservers string[]
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enableDhcp boolean
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gatewayIp string
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    hostRoutes VpcNetworkSubnetV2HostRoute[]
    Host routes of the subnet.
    ipVersion number
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6AddressMode string
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6RaMode string
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name string
    Name of the subnet.
    networkId string
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    noGateway boolean
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    projectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region string
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    serviceTypes string[]
    Service types of the subnet.
    tags string[]
    Tags of the subnet.
    timeouts VpcNetworkSubnetV2Timeouts
    all_tags Sequence[str]
    All tags of the subnet.
    allocation_pools Sequence[VpcNetworkSubnetV2AllocationPoolArgs]
    Allocation pools of the subnet.
    blocked bool
    Specifies if the subnet is administratively blocked.
    cidr str
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    description str
    Description of the subnet.
    dns_nameservers Sequence[str]
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enable_dhcp bool
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gateway_ip str
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    host_routes Sequence[VpcNetworkSubnetV2HostRouteArgs]
    Host routes of the subnet.
    ip_version float
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6_address_mode str
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6_ra_mode str
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name str
    Name of the subnet.
    network_id str
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    no_gateway bool
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    project_id str
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region str
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    service_types Sequence[str]
    Service types of the subnet.
    tags Sequence[str]
    Tags of the subnet.
    timeouts VpcNetworkSubnetV2TimeoutsArgs
    allTags List<String>
    All tags of the subnet.
    allocationPools List<Property Map>
    Allocation pools of the subnet.
    blocked Boolean
    Specifies if the subnet is administratively blocked.
    cidr String
    CIDR of the subnet, for example 10.0.0.0/8. Changing this creates a new subnet.
    description String
    Description of the subnet.
    dnsNameservers List<String>
    DNS nameservers of the subnet, for example, 188.93.16.19.
    enableDhcp Boolean
    Specifies if DHCP is enabled for the subnet. The default value is true.
    gatewayIp String
    Gateway of the subnet, for example, 192.168.199.1. If not specified, the first address of the subnet is used. Conflicts with no_gateway.
    hostRoutes List<Property Map>
    Host routes of the subnet.
    ipVersion Number
    Internet protocol version. Available versions are 4 or 6. Changing this creates a new subnet. The default value is 4.
    ipv6AddressMode String
    IPv6 address assignment mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    ipv6RaMode String
    IPv6 router advertisement mode. Requires ip_version to be 6. Available modes are slaac, dhcpv6-stateful, or dhcpv6-stateless. Changing this creates a new subnet.
    name String
    Name of the subnet.
    networkId String
    Unique identifier of the parent network. Retrieved from the selectelvpcnetwork_v2 resource. Changing this creates a new subnet.
    noGateway Boolean
    Specifies whether to create the subnet without a gateway. Conflicts with gateway_ip. The default value is false.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new subnet.
    region String
    Pool where the subnet is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new subnet.
    serviceTypes List<String>
    Service types of the subnet.
    tags List<String>
    Tags of the subnet.
    timeouts Property Map

    Supporting Types

    VpcNetworkSubnetV2AllocationPool, VpcNetworkSubnetV2AllocationPoolArgs

    End string
    Last address of the pool, for example, 192.168.199.20.
    Start string
    First address of the pool, for example, 192.168.199.10.
    End string
    Last address of the pool, for example, 192.168.199.20.
    Start string
    First address of the pool, for example, 192.168.199.10.
    end string
    Last address of the pool, for example, 192.168.199.20.
    start string
    First address of the pool, for example, 192.168.199.10.
    end String
    Last address of the pool, for example, 192.168.199.20.
    start String
    First address of the pool, for example, 192.168.199.10.
    end string
    Last address of the pool, for example, 192.168.199.20.
    start string
    First address of the pool, for example, 192.168.199.10.
    end str
    Last address of the pool, for example, 192.168.199.20.
    start str
    First address of the pool, for example, 192.168.199.10.
    end String
    Last address of the pool, for example, 192.168.199.20.
    start String
    First address of the pool, for example, 192.168.199.10.

    VpcNetworkSubnetV2HostRoute, VpcNetworkSubnetV2HostRouteArgs

    VpcNetworkSubnetV2Timeouts, VpcNetworkSubnetV2TimeoutsArgs

    Delete string
    Delete string
    delete string
    delete String
    delete string
    delete str
    delete String

    Import

    All versions

    Use the pulumi import command:

    export OS_DOMAIN_NAME=<domain_name>

    export OS_USERNAME=

    export OS_PASSWORD=

    export INFRA_PROJECT_ID=<project_id>

    export INFRA_REGION=

    $ pulumi import selectel:index/vpcNetworkSubnetV2:VpcNetworkSubnetV2 subnet_1 <id>
    

    <domain_name>, <username>, and <password> are the arguments of the provider configuration.

    Other identity attributes are described above in the import or resource sections.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    selectel
    Viewing docs for selectel 9.5.0
    published on Friday, Oct 30, 2026 by selectel

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial