published on Friday, Oct 30, 2026 by selectel
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. - 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<VpcNetwork Subnet V2Allocation Pool> - 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 withno_gateway. - Ip
Version double - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - Ipv6Address
Mode string - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - Ipv6Ra
Mode string - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - List<string>
- Tags of the subnet.
- Timeouts
Vpc
Network Subnet V2Timeouts
- 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 []VpcNetwork Subnet V2Allocation Pool Args - Allocation pools of the subnet.
- Description string
- Description of the subnet.
- Dns
Nameservers []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 withno_gateway. - Ip
Version float64 - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - Ipv6Address
Mode string - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - Ipv6Ra
Mode string - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - []string
- Tags of the subnet.
- Timeouts
Vpc
Network Subnet V2Timeouts Args
- 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 withno_gateway. - ip_
version number - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6_
address_ stringmode - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6_
ra_ stringmode - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - 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. - 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<VpcNetwork Subnet V2Allocation Pool> - 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 Boolean - 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 withno_gateway. - ip
Version Double - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6Address
Mode String - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6Ra
Mode String - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - name String
- Name of the subnet.
- no
Gateway Boolean - Specifies whether to create the subnet without a gateway. Conflicts with
gateway_ip. The default value isfalse. - List<String>
- Tags of the subnet.
- timeouts
Vpc
Network Subnet V2Timeouts
- 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 VpcNetwork Subnet V2Allocation Pool[] - Allocation pools of the subnet.
- description string
- Description of the subnet.
- dns
Nameservers string[] - DNS nameservers of the subnet, for example,
188.93.16.19. - enable
Dhcp boolean - 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 withno_gateway. - ip
Version number - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6Address
Mode string - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6Ra
Mode string - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - name string
- Name of the subnet.
- no
Gateway boolean - Specifies whether to create the subnet without a gateway. Conflicts with
gateway_ip. The default value isfalse. - string[]
- Tags of the subnet.
- timeouts
Vpc
Network Subnet V2Timeouts
- 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[VpcNetwork Subnet V2Allocation Pool Args] - 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 withno_gateway. - ip_
version float - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6_
address_ strmode - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6_
ra_ strmode - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - Sequence[str]
- Tags of the subnet.
- timeouts
Vpc
Network Subnet V2Timeouts Args
- 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<Property Map> - 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 Boolean - 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 withno_gateway. - ip
Version Number - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6Address
Mode String - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6Ra
Mode String - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - name String
- Name of the subnet.
- no
Gateway Boolean - Specifies whether to create the subnet without a gateway. Conflicts with
gateway_ip. The default value isfalse. - 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:
- List<string>
- All tags of the subnet.
- Blocked bool
- Specifies if the subnet is administratively blocked.
- Host
Routes List<VpcNetwork Subnet V2Host Route> - 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.
- []string
- All tags of the subnet.
- Blocked bool
- Specifies if the subnet is administratively blocked.
- Host
Routes []VpcNetwork Subnet V2Host Route - Host routes of the subnet.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Types []string - Service types of the subnet.
- 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.
- List<String>
- All tags of the subnet.
- blocked Boolean
- Specifies if the subnet is administratively blocked.
- host
Routes List<VpcNetwork Subnet V2Host Route> - 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.
- string[]
- All tags of the subnet.
- blocked boolean
- Specifies if the subnet is administratively blocked.
- host
Routes VpcNetwork Subnet V2Host Route[] - Host routes of the subnet.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Types string[] - Service types of the subnet.
- Sequence[str]
- All tags of the subnet.
- blocked bool
- Specifies if the subnet is administratively blocked.
- host_
routes Sequence[VpcNetwork Subnet V2Host Route] - 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.
- List<String>
- All tags of the subnet.
- blocked Boolean
- Specifies if the subnet is administratively blocked.
- host
Routes List<Property Map> - 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.
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) -> VpcNetworkSubnetV2func 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.
- List<string>
- All tags of the subnet.
- Allocation
Pools List<VpcNetwork Subnet V2Allocation Pool> - 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 withno_gateway. - Host
Routes List<VpcNetwork Subnet V2Host Route> - Host routes of the subnet.
- Ip
Version double - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - Ipv6Address
Mode string - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - Ipv6Ra
Mode string - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - 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.
- List<string>
- Tags of the subnet.
- Timeouts
Vpc
Network Subnet V2Timeouts
- []string
- All tags of the subnet.
- Allocation
Pools []VpcNetwork Subnet V2Allocation Pool Args - 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 []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 withno_gateway. - Host
Routes []VpcNetwork Subnet V2Host Route Args - Host routes of the subnet.
- Ip
Version float64 - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - Ipv6Address
Mode string - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - Ipv6Ra
Mode string - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - 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 []string - Service types of the subnet.
- []string
- Tags of the subnet.
- Timeouts
Vpc
Network Subnet V2Timeouts Args
- 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 withno_gateway. - host_
routes list(object) - Host routes of the subnet.
- ip_
version number - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6_
address_ stringmode - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6_
ra_ stringmode - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - 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.
- list(string)
- Tags of the subnet.
- timeouts object
- List<String>
- All tags of the subnet.
- allocation
Pools List<VpcNetwork Subnet V2Allocation Pool> - 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.
- dns
Nameservers List<String> - DNS nameservers of the subnet, for example,
188.93.16.19. - enable
Dhcp Boolean - 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 withno_gateway. - host
Routes List<VpcNetwork Subnet V2Host Route> - Host routes of the subnet.
- ip
Version Double - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6Address
Mode String - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6Ra
Mode String - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 Boolean - Specifies whether to create the subnet without a gateway. Conflicts with
gateway_ip. The default value isfalse. - 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.
- List<String>
- Tags of the subnet.
- timeouts
Vpc
Network Subnet V2Timeouts
- string[]
- All tags of the subnet.
- allocation
Pools VpcNetwork Subnet V2Allocation Pool[] - 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.
- dns
Nameservers string[] - DNS nameservers of the subnet, for example,
188.93.16.19. - enable
Dhcp boolean - 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 withno_gateway. - host
Routes VpcNetwork Subnet V2Host Route[] - Host routes of the subnet.
- ip
Version number - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6Address
Mode string - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6Ra
Mode string - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 boolean - Specifies whether to create the subnet without a gateway. Conflicts with
gateway_ip. The default value isfalse. - 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 string[] - Service types of the subnet.
- string[]
- Tags of the subnet.
- timeouts
Vpc
Network Subnet V2Timeouts
- Sequence[str]
- All tags of the subnet.
- allocation_
pools Sequence[VpcNetwork Subnet V2Allocation Pool Args] - 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 withno_gateway. - host_
routes Sequence[VpcNetwork Subnet V2Host Route Args] - Host routes of the subnet.
- ip_
version float - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6_
address_ strmode - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6_
ra_ strmode - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 isfalse. - 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.
- Sequence[str]
- Tags of the subnet.
- timeouts
Vpc
Network Subnet V2Timeouts Args
- List<String>
- All tags of the subnet.
- allocation
Pools 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.
- dns
Nameservers List<String> - DNS nameservers of the subnet, for example,
188.93.16.19. - enable
Dhcp Boolean - 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 withno_gateway. - host
Routes List<Property Map> - Host routes of the subnet.
- ip
Version Number - Internet protocol version. Available versions are
4or6. Changing this creates a new subnet. The default value is4. - ipv6Address
Mode String - IPv6 address assignment mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-stateless. Changing this creates a new subnet. - ipv6Ra
Mode String - IPv6 router advertisement mode. Requires
ip_versionto be6. Available modes areslaac,dhcpv6-stateful, ordhcpv6-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 Boolean - Specifies whether to create the subnet without a gateway. Conflicts with
gateway_ip. The default value isfalse. - 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.
- List<String>
- Tags of the subnet.
- timeouts Property Map
Supporting Types
VpcNetworkSubnetV2AllocationPool, VpcNetworkSubnetV2AllocationPoolArgs
VpcNetworkSubnetV2HostRoute, VpcNetworkSubnetV2HostRouteArgs
- Destination
Cidr string - Next
Hop string
- Destination
Cidr string - Next
Hop string
- destination_
cidr string - next_
hop string
- destination
Cidr String - next
Hop String
- destination
Cidr string - next
Hop string
- destination_
cidr str - next_
hop str
- destination
Cidr String - next
Hop String
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
selectelTerraform Provider.
published on Friday, Oct 30, 2026 by selectel