published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
The subnet is a segment allocated within a specified availability zone from a VPC CIDR block, providing private IP addresses for cloud resources such as cloud servers and load balancers
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
const subnetDemo = new volcenginecc.vpc.Subnet("SubnetDemo", {
vpcId: "vpc-xxxx",
zoneId: "cn-beijing",
subnetName: "subnetDemo",
description: "subnetDemo description",
cidrBlock: "192.168.xx.0/24",
tags: [{
key: "env",
value: "test",
}],
});
import pulumi
import pulumi_volcenginecc as volcenginecc
subnet_demo = volcenginecc.vpc.Subnet("SubnetDemo",
vpc_id="vpc-xxxx",
zone_id="cn-beijing",
subnet_name="subnetDemo",
description="subnetDemo description",
cidr_block="192.168.xx.0/24",
tags=[{
"key": "env",
"value": "test",
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpc.NewSubnet(ctx, "SubnetDemo", &vpc.SubnetArgs{
VpcId: pulumi.String("vpc-xxxx"),
ZoneId: pulumi.String("cn-beijing"),
SubnetName: pulumi.String("subnetDemo"),
Description: pulumi.String("subnetDemo description"),
CidrBlock: pulumi.String("192.168.xx.0/24"),
Tags: vpc.SubnetTagArray{
&vpc.SubnetTagArgs{
Key: pulumi.String("env"),
Value: pulumi.String("test"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
return await Deployment.RunAsync(() =>
{
var subnetDemo = new Volcenginecc.Vpc.Subnet("SubnetDemo", new()
{
VpcId = "vpc-xxxx",
ZoneId = "cn-beijing",
SubnetName = "subnetDemo",
Description = "subnetDemo description",
CidrBlock = "192.168.xx.0/24",
Tags = new[]
{
new Volcenginecc.Vpc.Inputs.SubnetTagArgs
{
Key = "env",
Value = "test",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.volcengine.volcenginecc.vpc.Subnet;
import com.volcengine.volcenginecc.vpc.SubnetArgs;
import com.pulumi.volcenginecc.vpc.inputs.SubnetTagArgs;
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 subnetDemo = new Subnet("subnetDemo", SubnetArgs.builder()
.vpcId("vpc-xxxx")
.zoneId("cn-beijing")
.subnetName("subnetDemo")
.description("subnetDemo description")
.cidrBlock("192.168.xx.0/24")
.tags(SubnetTagArgs.builder()
.key("env")
.value("test")
.build())
.build());
}
}
resources:
subnetDemo:
type: volcenginecc:vpc:Subnet
name: SubnetDemo
properties:
vpcId: vpc-xxxx
zoneId: cn-beijing
subnetName: subnetDemo
description: subnetDemo description
cidrBlock: 192.168.xx.0/24
tags:
- key: env
value: test
Create Subnet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);@overload
def Subnet(resource_name: str,
args: SubnetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Subnet(resource_name: str,
opts: Optional[ResourceOptions] = None,
cidr_block: Optional[str] = None,
vpc_id: Optional[str] = None,
zone_id: Optional[str] = None,
description: Optional[str] = None,
enable_ipv6: Optional[bool] = None,
ipv6_cidr_block: Optional[str] = None,
subnet_name: Optional[str] = None,
tags: Optional[Sequence[SubnetTagArgs]] = None)func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
public Subnet(String name, SubnetArgs args)
public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
type: volcenginecc:vpc:Subnet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SubnetArgs
- 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 SubnetArgs
- 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 SubnetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubnetArgs
- 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 subnetResource = new Volcenginecc.Vpc.Subnet("subnetResource", new()
{
CidrBlock = "string",
VpcId = "string",
ZoneId = "string",
Description = "string",
EnableIpv6 = false,
Ipv6CidrBlock = "string",
SubnetName = "string",
Tags = new[]
{
new Volcenginecc.Vpc.Inputs.SubnetTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := vpc.NewSubnet(ctx, "subnetResource", &vpc.SubnetArgs{
CidrBlock: pulumi.String("string"),
VpcId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Description: pulumi.String("string"),
EnableIpv6: pulumi.Bool(false),
Ipv6CidrBlock: pulumi.String("string"),
SubnetName: pulumi.String("string"),
Tags: vpc.SubnetTagArray{
&vpc.SubnetTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var subnetResource = new Subnet("subnetResource", SubnetArgs.builder()
.cidrBlock("string")
.vpcId("string")
.zoneId("string")
.description("string")
.enableIpv6(false)
.ipv6CidrBlock("string")
.subnetName("string")
.tags(SubnetTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
subnet_resource = volcenginecc.vpc.Subnet("subnetResource",
cidr_block="string",
vpc_id="string",
zone_id="string",
description="string",
enable_ipv6=False,
ipv6_cidr_block="string",
subnet_name="string",
tags=[{
"key": "string",
"value": "string",
}])
const subnetResource = new volcenginecc.vpc.Subnet("subnetResource", {
cidrBlock: "string",
vpcId: "string",
zoneId: "string",
description: "string",
enableIpv6: false,
ipv6CidrBlock: "string",
subnetName: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: volcenginecc:vpc:Subnet
properties:
cidrBlock: string
description: string
enableIpv6: false
ipv6CidrBlock: string
subnetName: string
tags:
- key: string
value: string
vpcId: string
zoneId: string
Subnet 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 Subnet resource accepts the following input properties:
- Cidr
Block string - Subnet IPv4 CIDR block
- Vpc
Id string - ID of the VPC to which the subnet belongs
- Zone
Id string - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- Description string
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- Enable
Ipv6 bool - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- Ipv6Cidr
Block string - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- Subnet
Name string - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
List<Volcengine.
Subnet Tag>
- Cidr
Block string - Subnet IPv4 CIDR block
- Vpc
Id string - ID of the VPC to which the subnet belongs
- Zone
Id string - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- Description string
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- Enable
Ipv6 bool - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- Ipv6Cidr
Block string - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- Subnet
Name string - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
[]Subnet
Tag Args
- cidr
Block String - Subnet IPv4 CIDR block
- vpc
Id String - ID of the VPC to which the subnet belongs
- zone
Id String - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- description String
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable
Ipv6 Boolean - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6Cidr
Block String - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- subnet
Name String - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
List<Subnet
Tag>
- cidr
Block string - Subnet IPv4 CIDR block
- vpc
Id string - ID of the VPC to which the subnet belongs
- zone
Id string - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- description string
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable
Ipv6 boolean - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6Cidr
Block string - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- subnet
Name string - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
Subnet
Tag[]
- cidr_
block str - Subnet IPv4 CIDR block
- vpc_
id str - ID of the VPC to which the subnet belongs
- zone_
id str - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- description str
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable_
ipv6 bool - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6_
cidr_ strblock - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- subnet_
name str - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
Sequence[Subnet
Tag Args]
- cidr
Block String - Subnet IPv4 CIDR block
- vpc
Id String - ID of the VPC to which the subnet belongs
- zone
Id String - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- description String
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable
Ipv6 Boolean - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6Cidr
Block String - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- subnet
Name String - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
- List<Property Map>
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
- Account
Id string - ID of the account to which the subnet belongs
- Available
Ip intAddress Count - Number of available IP addresses in the subnet
- Created
Time string - Subnet creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- Network
Acl stringId - ID of the network ACL associated with the subnet
- Project
Name string - Name of the project associated with the VPC instance where the subnet resides
- Read
Ipv6Cidr stringBlock - Read-only field, subnet IPv6 CIDR block
- Route
Table Volcengine.Subnet Route Table - Route table information
- Status string
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- Subnet
Id string - ID of the subnet whose information is to be modified
- Total
Ipv4Count int - Total number of available IPs in the subnet
- Updated
Time string - Subnet update time
- Account
Id string - ID of the account to which the subnet belongs
- Available
Ip intAddress Count - Number of available IP addresses in the subnet
- Created
Time string - Subnet creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- Network
Acl stringId - ID of the network ACL associated with the subnet
- Project
Name string - Name of the project associated with the VPC instance where the subnet resides
- Read
Ipv6Cidr stringBlock - Read-only field, subnet IPv6 CIDR block
- Route
Table SubnetRoute Table - Route table information
- Status string
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- Subnet
Id string - ID of the subnet whose information is to be modified
- Total
Ipv4Count int - Total number of available IPs in the subnet
- Updated
Time string - Subnet update time
- account
Id String - ID of the account to which the subnet belongs
- available
Ip IntegerAddress Count - Number of available IP addresses in the subnet
- created
Time String - Subnet creation time
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network
Acl StringId - ID of the network ACL associated with the subnet
- project
Name String - Name of the project associated with the VPC instance where the subnet resides
- read
Ipv6Cidr StringBlock - Read-only field, subnet IPv6 CIDR block
- route
Table SubnetRoute Table - Route table information
- status String
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet
Id String - ID of the subnet whose information is to be modified
- total
Ipv4Count Integer - Total number of available IPs in the subnet
- updated
Time String - Subnet update time
- account
Id string - ID of the account to which the subnet belongs
- available
Ip numberAddress Count - Number of available IP addresses in the subnet
- created
Time string - Subnet creation time
- id string
- The provider-assigned unique ID for this managed resource.
- is
Default boolean - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network
Acl stringId - ID of the network ACL associated with the subnet
- project
Name string - Name of the project associated with the VPC instance where the subnet resides
- read
Ipv6Cidr stringBlock - Read-only field, subnet IPv6 CIDR block
- route
Table SubnetRoute Table - Route table information
- status string
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet
Id string - ID of the subnet whose information is to be modified
- total
Ipv4Count number - Total number of available IPs in the subnet
- updated
Time string - Subnet update time
- account_
id str - ID of the account to which the subnet belongs
- available_
ip_ intaddress_ count - Number of available IP addresses in the subnet
- created_
time str - Subnet creation time
- id str
- The provider-assigned unique ID for this managed resource.
- is_
default bool - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network_
acl_ strid - ID of the network ACL associated with the subnet
- project_
name str - Name of the project associated with the VPC instance where the subnet resides
- read_
ipv6_ strcidr_ block - Read-only field, subnet IPv6 CIDR block
- route_
table SubnetRoute Table - Route table information
- status str
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet_
id str - ID of the subnet whose information is to be modified
- total_
ipv4_ intcount - Total number of available IPs in the subnet
- updated_
time str - Subnet update time
- account
Id String - ID of the account to which the subnet belongs
- available
Ip NumberAddress Count - Number of available IP addresses in the subnet
- created
Time String - Subnet creation time
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network
Acl StringId - ID of the network ACL associated with the subnet
- project
Name String - Name of the project associated with the VPC instance where the subnet resides
- read
Ipv6Cidr StringBlock - Read-only field, subnet IPv6 CIDR block
- route
Table Property Map - Route table information
- status String
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet
Id String - ID of the subnet whose information is to be modified
- total
Ipv4Count Number - Total number of available IPs in the subnet
- updated
Time String - Subnet update time
Look up Existing Subnet Resource
Get an existing Subnet 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?: SubnetState, opts?: CustomResourceOptions): Subnet@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
available_ip_address_count: Optional[int] = None,
cidr_block: Optional[str] = None,
created_time: Optional[str] = None,
description: Optional[str] = None,
enable_ipv6: Optional[bool] = None,
ipv6_cidr_block: Optional[str] = None,
is_default: Optional[bool] = None,
network_acl_id: Optional[str] = None,
project_name: Optional[str] = None,
read_ipv6_cidr_block: Optional[str] = None,
route_table: Optional[SubnetRouteTableArgs] = None,
status: Optional[str] = None,
subnet_id: Optional[str] = None,
subnet_name: Optional[str] = None,
tags: Optional[Sequence[SubnetTagArgs]] = None,
total_ipv4_count: Optional[int] = None,
updated_time: Optional[str] = None,
vpc_id: Optional[str] = None,
zone_id: Optional[str] = None) -> Subnetfunc GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)public static Subnet get(String name, Output<String> id, SubnetState state, CustomResourceOptions options)resources: _: type: volcenginecc:vpc:Subnet get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - ID of the account to which the subnet belongs
- Available
Ip intAddress Count - Number of available IP addresses in the subnet
- Cidr
Block string - Subnet IPv4 CIDR block
- Created
Time string - Subnet creation time
- Description string
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- Enable
Ipv6 bool - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- Ipv6Cidr
Block string - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- Is
Default bool - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- Network
Acl stringId - ID of the network ACL associated with the subnet
- Project
Name string - Name of the project associated with the VPC instance where the subnet resides
- Read
Ipv6Cidr stringBlock - Read-only field, subnet IPv6 CIDR block
- Route
Table Volcengine.Subnet Route Table - Route table information
- Status string
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- Subnet
Id string - ID of the subnet whose information is to be modified
- Subnet
Name string - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
List<Volcengine.
Subnet Tag> - Total
Ipv4Count int - Total number of available IPs in the subnet
- Updated
Time string - Subnet update time
- Vpc
Id string - ID of the VPC to which the subnet belongs
- Zone
Id string - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- Account
Id string - ID of the account to which the subnet belongs
- Available
Ip intAddress Count - Number of available IP addresses in the subnet
- Cidr
Block string - Subnet IPv4 CIDR block
- Created
Time string - Subnet creation time
- Description string
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- Enable
Ipv6 bool - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- Ipv6Cidr
Block string - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- Is
Default bool - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- Network
Acl stringId - ID of the network ACL associated with the subnet
- Project
Name string - Name of the project associated with the VPC instance where the subnet resides
- Read
Ipv6Cidr stringBlock - Read-only field, subnet IPv6 CIDR block
- Route
Table SubnetRoute Table Args - Route table information
- Status string
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- Subnet
Id string - ID of the subnet whose information is to be modified
- Subnet
Name string - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
[]Subnet
Tag Args - Total
Ipv4Count int - Total number of available IPs in the subnet
- Updated
Time string - Subnet update time
- Vpc
Id string - ID of the VPC to which the subnet belongs
- Zone
Id string - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- account
Id String - ID of the account to which the subnet belongs
- available
Ip IntegerAddress Count - Number of available IP addresses in the subnet
- cidr
Block String - Subnet IPv4 CIDR block
- created
Time String - Subnet creation time
- description String
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable
Ipv6 Boolean - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6Cidr
Block String - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- is
Default Boolean - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network
Acl StringId - ID of the network ACL associated with the subnet
- project
Name String - Name of the project associated with the VPC instance where the subnet resides
- read
Ipv6Cidr StringBlock - Read-only field, subnet IPv6 CIDR block
- route
Table SubnetRoute Table - Route table information
- status String
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet
Id String - ID of the subnet whose information is to be modified
- subnet
Name String - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
List<Subnet
Tag> - total
Ipv4Count Integer - Total number of available IPs in the subnet
- updated
Time String - Subnet update time
- vpc
Id String - ID of the VPC to which the subnet belongs
- zone
Id String - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- account
Id string - ID of the account to which the subnet belongs
- available
Ip numberAddress Count - Number of available IP addresses in the subnet
- cidr
Block string - Subnet IPv4 CIDR block
- created
Time string - Subnet creation time
- description string
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable
Ipv6 boolean - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6Cidr
Block string - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- is
Default boolean - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network
Acl stringId - ID of the network ACL associated with the subnet
- project
Name string - Name of the project associated with the VPC instance where the subnet resides
- read
Ipv6Cidr stringBlock - Read-only field, subnet IPv6 CIDR block
- route
Table SubnetRoute Table - Route table information
- status string
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet
Id string - ID of the subnet whose information is to be modified
- subnet
Name string - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
Subnet
Tag[] - total
Ipv4Count number - Total number of available IPs in the subnet
- updated
Time string - Subnet update time
- vpc
Id string - ID of the VPC to which the subnet belongs
- zone
Id string - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- account_
id str - ID of the account to which the subnet belongs
- available_
ip_ intaddress_ count - Number of available IP addresses in the subnet
- cidr_
block str - Subnet IPv4 CIDR block
- created_
time str - Subnet creation time
- description str
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable_
ipv6 bool - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6_
cidr_ strblock - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- is_
default bool - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network_
acl_ strid - ID of the network ACL associated with the subnet
- project_
name str - Name of the project associated with the VPC instance where the subnet resides
- read_
ipv6_ strcidr_ block - Read-only field, subnet IPv6 CIDR block
- route_
table SubnetRoute Table Args - Route table information
- status str
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet_
id str - ID of the subnet whose information is to be modified
- subnet_
name str - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
-
Sequence[Subnet
Tag Args] - total_
ipv4_ intcount - Total number of available IPs in the subnet
- updated_
time str - Subnet update time
- vpc_
id str - ID of the VPC to which the subnet belongs
- zone_
id str - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
- account
Id String - ID of the account to which the subnet belongs
- available
Ip NumberAddress Count - Number of available IP addresses in the subnet
- cidr
Block String - Subnet IPv4 CIDR block
- created
Time String - Subnet creation time
- description String
- Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https://
- enable
Ipv6 Boolean - Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses
- ipv6Cidr
Block String - Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64
- is
Default Boolean - Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user
- network
Acl StringId - ID of the network ACL associated with the subnet
- project
Name String - Name of the project associated with the VPC instance where the subnet resides
- read
Ipv6Cidr StringBlock - Read-only field, subnet IPv6 CIDR block
- route
Table Property Map - Route table information
- status String
- Subnet status. 1. Pending: Configuring. 2. Available: Available
- subnet
Id String - ID of the subnet whose information is to be modified
- subnet
Name String - Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID
- List<Property Map>
- total
Ipv4Count Number - Total number of available IPs in the subnet
- updated
Time String - Subnet update time
- vpc
Id String - ID of the VPC to which the subnet belongs
- zone
Id String - Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones
Supporting Types
SubnetRouteTable, SubnetRouteTableArgs
- Route
Table stringId - ID of the route table associated with the subnet
- Route
Table stringType - Type of route table associated with the subnet. 1. System: System route table. 2. Custom: Custom route table
- Route
Table stringId - ID of the route table associated with the subnet
- Route
Table stringType - Type of route table associated with the subnet. 1. System: System route table. 2. Custom: Custom route table
- route
Table StringId - ID of the route table associated with the subnet
- route
Table StringType - Type of route table associated with the subnet. 1. System: System route table. 2. Custom: Custom route table
- route
Table stringId - ID of the route table associated with the subnet
- route
Table stringType - Type of route table associated with the subnet. 1. System: System route table. 2. Custom: Custom route table
- route_
table_ strid - ID of the route table associated with the subnet
- route_
table_ strtype - Type of route table associated with the subnet. 1. System: System route table. 2. Custom: Custom route table
- route
Table StringId - ID of the route table associated with the subnet
- route
Table StringType - Type of route table associated with the subnet. 1. System: System route table. 2. Custom: Custom route table
SubnetTag, SubnetTagArgs
Import
$ pulumi import volcenginecc:vpc/subnet:Subnet example "subnet_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
