published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
A private network creates an isolated, self-configurable virtual network environment for cloud resources. You can customize IP address ranges, security groups, routing policies, and other network features within the private network to manage cloud resources simply, efficiently, and securely.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
vPCDemo:
type: volcenginecc:vpc:Vpc
name: VPCDemo
properties:
cidrBlock: 192.168.0.0/24
supportIpv4Gateway: true
vpcName: vpc-demo
description: VpcDemo Example
enableIpv6: false
dnsServers:
- 12.3.x.x
associateCens:
- cen_id: cen-3re8cx4vwdibk5zsk2xxxx
cen_owner_id: 200000xxx
cen_status: Attaching
natGatewayIds:
- ngw-2d6tp1y8zq41s58ozfdxxx
routeTableIds:
- vtb-29mkf8ft83l6o1e1hgixxx
securityGroupIds:
- sg-29mkx39jb80741e1hgj2bxxx
projectName: default
tags:
- key: env
value: test
Create Vpc Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Vpc(name: string, args?: VpcArgs, opts?: CustomResourceOptions);@overload
def Vpc(resource_name: str,
args: Optional[VpcArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Vpc(resource_name: str,
opts: Optional[ResourceOptions] = None,
cidr_block: Optional[str] = None,
description: Optional[str] = None,
dns_servers: Optional[Sequence[str]] = None,
enable_ipv6: Optional[bool] = None,
ipv4_gateway_id: Optional[str] = None,
ipv6_cidr_block: Optional[str] = None,
nat_gateway_ids: Optional[Sequence[str]] = None,
project_name: Optional[str] = None,
secondary_cidr_blocks: Optional[Sequence[str]] = None,
subnet_ids: Optional[Sequence[str]] = None,
support_ipv4_gateway: Optional[bool] = None,
tags: Optional[Sequence[VpcTagArgs]] = None,
vpc_name: Optional[str] = None)func NewVpc(ctx *Context, name string, args *VpcArgs, opts ...ResourceOption) (*Vpc, error)public Vpc(string name, VpcArgs? args = null, CustomResourceOptions? opts = null)type: volcenginecc:vpc:Vpc
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 VpcArgs
- 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 VpcArgs
- 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 VpcArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcArgs
- 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 vpcResource = new Volcenginecc.Vpc.Vpc("vpcResource", new()
{
CidrBlock = "string",
Description = "string",
DnsServers = new[]
{
"string",
},
EnableIpv6 = false,
Ipv4GatewayId = "string",
Ipv6CidrBlock = "string",
NatGatewayIds = new[]
{
"string",
},
ProjectName = "string",
SecondaryCidrBlocks = new[]
{
"string",
},
SubnetIds = new[]
{
"string",
},
SupportIpv4Gateway = false,
Tags = new[]
{
new Volcenginecc.Vpc.Inputs.VpcTagArgs
{
Key = "string",
Value = "string",
},
},
VpcName = "string",
});
example, err := vpc.NewVpc(ctx, "vpcResource", &vpc.VpcArgs{
CidrBlock: pulumi.String("string"),
Description: pulumi.String("string"),
DnsServers: pulumi.StringArray{
pulumi.String("string"),
},
EnableIpv6: pulumi.Bool(false),
Ipv4GatewayId: pulumi.String("string"),
Ipv6CidrBlock: pulumi.String("string"),
NatGatewayIds: pulumi.StringArray{
pulumi.String("string"),
},
ProjectName: pulumi.String("string"),
SecondaryCidrBlocks: pulumi.StringArray{
pulumi.String("string"),
},
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
SupportIpv4Gateway: pulumi.Bool(false),
Tags: vpc.VpcTagArray{
&vpc.VpcTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
VpcName: pulumi.String("string"),
})
var vpcResource = new Vpc("vpcResource", VpcArgs.builder()
.cidrBlock("string")
.description("string")
.dnsServers("string")
.enableIpv6(false)
.ipv4GatewayId("string")
.ipv6CidrBlock("string")
.natGatewayIds("string")
.projectName("string")
.secondaryCidrBlocks("string")
.subnetIds("string")
.supportIpv4Gateway(false)
.tags(VpcTagArgs.builder()
.key("string")
.value("string")
.build())
.vpcName("string")
.build());
vpc_resource = volcenginecc.vpc.Vpc("vpcResource",
cidr_block="string",
description="string",
dns_servers=["string"],
enable_ipv6=False,
ipv4_gateway_id="string",
ipv6_cidr_block="string",
nat_gateway_ids=["string"],
project_name="string",
secondary_cidr_blocks=["string"],
subnet_ids=["string"],
support_ipv4_gateway=False,
tags=[{
"key": "string",
"value": "string",
}],
vpc_name="string")
const vpcResource = new volcenginecc.vpc.Vpc("vpcResource", {
cidrBlock: "string",
description: "string",
dnsServers: ["string"],
enableIpv6: false,
ipv4GatewayId: "string",
ipv6CidrBlock: "string",
natGatewayIds: ["string"],
projectName: "string",
secondaryCidrBlocks: ["string"],
subnetIds: ["string"],
supportIpv4Gateway: false,
tags: [{
key: "string",
value: "string",
}],
vpcName: "string",
});
type: volcenginecc:vpc:Vpc
properties:
cidrBlock: string
description: string
dnsServers:
- string
enableIpv6: false
ipv4GatewayId: string
ipv6CidrBlock: string
natGatewayIds:
- string
projectName: string
secondaryCidrBlocks:
- string
subnetIds:
- string
supportIpv4Gateway: false
tags:
- key: string
value: string
vpcName: string
Vpc 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 Vpc resource accepts the following input properties:
- Cidr
Block string - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- Description string
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- Dns
Servers List<string> - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- Enable
Ipv6 bool - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- Ipv4Gateway
Id string - ID of the IPv4 gateway bound to the VPC.
- Ipv6Cidr
Block string - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- Nat
Gateway List<string>Ids - ID of the NAT gateway created in the VPC.
- Project
Name string - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- Secondary
Cidr List<string>Blocks - Secondary CIDR block of the VPC.
- Subnet
Ids List<string> - List of subnets in the VPC.
- Support
Ipv4Gateway bool - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
List<Volcengine.
Vpc Tag> - Vpc
Name string - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- Cidr
Block string - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- Description string
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- Dns
Servers []string - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- Enable
Ipv6 bool - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- Ipv4Gateway
Id string - ID of the IPv4 gateway bound to the VPC.
- Ipv6Cidr
Block string - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- Nat
Gateway []stringIds - ID of the NAT gateway created in the VPC.
- Project
Name string - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- Secondary
Cidr []stringBlocks - Secondary CIDR block of the VPC.
- Subnet
Ids []string - List of subnets in the VPC.
- Support
Ipv4Gateway bool - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
[]Vpc
Tag Args - Vpc
Name string - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- cidr
Block String - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- description String
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns
Servers List<String> - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable
Ipv6 Boolean - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4Gateway
Id String - ID of the IPv4 gateway bound to the VPC.
- ipv6Cidr
Block String - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- nat
Gateway List<String>Ids - ID of the NAT gateway created in the VPC.
- project
Name String - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- secondary
Cidr List<String>Blocks - Secondary CIDR block of the VPC.
- subnet
Ids List<String> - List of subnets in the VPC.
- support
Ipv4Gateway Boolean - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
List<Vpc
Tag> - vpc
Name String - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- cidr
Block string - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- description string
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns
Servers string[] - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable
Ipv6 boolean - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4Gateway
Id string - ID of the IPv4 gateway bound to the VPC.
- ipv6Cidr
Block string - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- nat
Gateway string[]Ids - ID of the NAT gateway created in the VPC.
- project
Name string - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- secondary
Cidr string[]Blocks - Secondary CIDR block of the VPC.
- subnet
Ids string[] - List of subnets in the VPC.
- support
Ipv4Gateway boolean - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
Vpc
Tag[] - vpc
Name string - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- cidr_
block str - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- description str
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns_
servers Sequence[str] - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable_
ipv6 bool - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4_
gateway_ strid - ID of the IPv4 gateway bound to the VPC.
- ipv6_
cidr_ strblock - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- nat_
gateway_ Sequence[str]ids - ID of the NAT gateway created in the VPC.
- project_
name str - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- secondary_
cidr_ Sequence[str]blocks - Secondary CIDR block of the VPC.
- subnet_
ids Sequence[str] - List of subnets in the VPC.
- support_
ipv4_ boolgateway - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
Sequence[Vpc
Tag Args] - vpc_
name str - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- cidr
Block String - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- description String
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns
Servers List<String> - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable
Ipv6 Boolean - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4Gateway
Id String - ID of the IPv4 gateway bound to the VPC.
- ipv6Cidr
Block String - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- nat
Gateway List<String>Ids - ID of the NAT gateway created in the VPC.
- project
Name String - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- secondary
Cidr List<String>Blocks - Secondary CIDR block of the VPC.
- subnet
Ids List<String> - List of subnets in the VPC.
- support
Ipv4Gateway Boolean - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
- List<Property Map>
- vpc
Name String - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
Outputs
All input properties are implicitly available as output properties. Additionally, the Vpc resource produces the following output properties:
- Account
Id string - ID of the account to which the VPC belongs.
- Associate
Cens List<Volcengine.Vpc Associate Cen> - Creation
Time string - Time when the VPC was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- Network
Acl stringNum - Number of network ACLs in the VPC.
- Route
Table List<string>Ids - ID of the route table associated with the VPC.
- Security
Group List<string>Ids - List of security groups in the VPC.
- Status string
- Status of the VPC. Creating: being created. Created: created. Available: available.
- Update
Time string - Time when the VPC was updated.
- User
Cidr List<string>Blocks - User CIDR block of the VPC.
- Vpc
Id string - ID of the VPC.
- Account
Id string - ID of the account to which the VPC belongs.
- Associate
Cens []VpcAssociate Cen - Creation
Time string - Time when the VPC was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- Network
Acl stringNum - Number of network ACLs in the VPC.
- Route
Table []stringIds - ID of the route table associated with the VPC.
- Security
Group []stringIds - List of security groups in the VPC.
- Status string
- Status of the VPC. Creating: being created. Created: created. Available: available.
- Update
Time string - Time when the VPC was updated.
- User
Cidr []stringBlocks - User CIDR block of the VPC.
- Vpc
Id string - ID of the VPC.
- account
Id String - ID of the account to which the VPC belongs.
- associate
Cens List<VpcAssociate Cen> - creation
Time String - Time when the VPC was created.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- network
Acl StringNum - Number of network ACLs in the VPC.
- route
Table List<String>Ids - ID of the route table associated with the VPC.
- security
Group List<String>Ids - List of security groups in the VPC.
- status String
- Status of the VPC. Creating: being created. Created: created. Available: available.
- update
Time String - Time when the VPC was updated.
- user
Cidr List<String>Blocks - User CIDR block of the VPC.
- vpc
Id String - ID of the VPC.
- account
Id string - ID of the account to which the VPC belongs.
- associate
Cens VpcAssociate Cen[] - creation
Time string - Time when the VPC was created.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Default boolean - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- network
Acl stringNum - Number of network ACLs in the VPC.
- route
Table string[]Ids - ID of the route table associated with the VPC.
- security
Group string[]Ids - List of security groups in the VPC.
- status string
- Status of the VPC. Creating: being created. Created: created. Available: available.
- update
Time string - Time when the VPC was updated.
- user
Cidr string[]Blocks - User CIDR block of the VPC.
- vpc
Id string - ID of the VPC.
- account_
id str - ID of the account to which the VPC belongs.
- associate_
cens Sequence[VpcAssociate Cen] - creation_
time str - Time when the VPC was created.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
default bool - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- network_
acl_ strnum - Number of network ACLs in the VPC.
- route_
table_ Sequence[str]ids - ID of the route table associated with the VPC.
- security_
group_ Sequence[str]ids - List of security groups in the VPC.
- status str
- Status of the VPC. Creating: being created. Created: created. Available: available.
- update_
time str - Time when the VPC was updated.
- user_
cidr_ Sequence[str]blocks - User CIDR block of the VPC.
- vpc_
id str - ID of the VPC.
- account
Id String - ID of the account to which the VPC belongs.
- associate
Cens List<Property Map> - creation
Time String - Time when the VPC was created.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- network
Acl StringNum - Number of network ACLs in the VPC.
- route
Table List<String>Ids - ID of the route table associated with the VPC.
- security
Group List<String>Ids - List of security groups in the VPC.
- status String
- Status of the VPC. Creating: being created. Created: created. Available: available.
- update
Time String - Time when the VPC was updated.
- user
Cidr List<String>Blocks - User CIDR block of the VPC.
- vpc
Id String - ID of the VPC.
Look up Existing Vpc Resource
Get an existing Vpc 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?: VpcState, opts?: CustomResourceOptions): Vpc@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
associate_cens: Optional[Sequence[VpcAssociateCenArgs]] = None,
cidr_block: Optional[str] = None,
creation_time: Optional[str] = None,
description: Optional[str] = None,
dns_servers: Optional[Sequence[str]] = None,
enable_ipv6: Optional[bool] = None,
ipv4_gateway_id: Optional[str] = None,
ipv6_cidr_block: Optional[str] = None,
is_default: Optional[bool] = None,
nat_gateway_ids: Optional[Sequence[str]] = None,
network_acl_num: Optional[str] = None,
project_name: Optional[str] = None,
route_table_ids: Optional[Sequence[str]] = None,
secondary_cidr_blocks: Optional[Sequence[str]] = None,
security_group_ids: Optional[Sequence[str]] = None,
status: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None,
support_ipv4_gateway: Optional[bool] = None,
tags: Optional[Sequence[VpcTagArgs]] = None,
update_time: Optional[str] = None,
user_cidr_blocks: Optional[Sequence[str]] = None,
vpc_id: Optional[str] = None,
vpc_name: Optional[str] = None) -> Vpcfunc GetVpc(ctx *Context, name string, id IDInput, state *VpcState, opts ...ResourceOption) (*Vpc, error)public static Vpc Get(string name, Input<string> id, VpcState? state, CustomResourceOptions? opts = null)public static Vpc get(String name, Output<String> id, VpcState state, CustomResourceOptions options)resources: _: type: volcenginecc:vpc:Vpc 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 VPC belongs.
- Associate
Cens List<Volcengine.Vpc Associate Cen> - Cidr
Block string - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- Creation
Time string - Time when the VPC was created.
- Description string
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- Dns
Servers List<string> - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- Enable
Ipv6 bool - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- Ipv4Gateway
Id string - ID of the IPv4 gateway bound to the VPC.
- Ipv6Cidr
Block string - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- Is
Default bool - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- Nat
Gateway List<string>Ids - ID of the NAT gateway created in the VPC.
- Network
Acl stringNum - Number of network ACLs in the VPC.
- Project
Name string - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- Route
Table List<string>Ids - ID of the route table associated with the VPC.
- Secondary
Cidr List<string>Blocks - Secondary CIDR block of the VPC.
- Security
Group List<string>Ids - List of security groups in the VPC.
- Status string
- Status of the VPC. Creating: being created. Created: created. Available: available.
- Subnet
Ids List<string> - List of subnets in the VPC.
- Support
Ipv4Gateway bool - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
List<Volcengine.
Vpc Tag> - Update
Time string - Time when the VPC was updated.
- User
Cidr List<string>Blocks - User CIDR block of the VPC.
- Vpc
Id string - ID of the VPC.
- Vpc
Name string - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- Account
Id string - ID of the account to which the VPC belongs.
- Associate
Cens []VpcAssociate Cen Args - Cidr
Block string - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- Creation
Time string - Time when the VPC was created.
- Description string
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- Dns
Servers []string - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- Enable
Ipv6 bool - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- Ipv4Gateway
Id string - ID of the IPv4 gateway bound to the VPC.
- Ipv6Cidr
Block string - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- Is
Default bool - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- Nat
Gateway []stringIds - ID of the NAT gateway created in the VPC.
- Network
Acl stringNum - Number of network ACLs in the VPC.
- Project
Name string - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- Route
Table []stringIds - ID of the route table associated with the VPC.
- Secondary
Cidr []stringBlocks - Secondary CIDR block of the VPC.
- Security
Group []stringIds - List of security groups in the VPC.
- Status string
- Status of the VPC. Creating: being created. Created: created. Available: available.
- Subnet
Ids []string - List of subnets in the VPC.
- Support
Ipv4Gateway bool - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
[]Vpc
Tag Args - Update
Time string - Time when the VPC was updated.
- User
Cidr []stringBlocks - User CIDR block of the VPC.
- Vpc
Id string - ID of the VPC.
- Vpc
Name string - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- account
Id String - ID of the account to which the VPC belongs.
- associate
Cens List<VpcAssociate Cen> - cidr
Block String - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- creation
Time String - Time when the VPC was created.
- description String
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns
Servers List<String> - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable
Ipv6 Boolean - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4Gateway
Id String - ID of the IPv4 gateway bound to the VPC.
- ipv6Cidr
Block String - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- is
Default Boolean - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- nat
Gateway List<String>Ids - ID of the NAT gateway created in the VPC.
- network
Acl StringNum - Number of network ACLs in the VPC.
- project
Name String - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- route
Table List<String>Ids - ID of the route table associated with the VPC.
- secondary
Cidr List<String>Blocks - Secondary CIDR block of the VPC.
- security
Group List<String>Ids - List of security groups in the VPC.
- status String
- Status of the VPC. Creating: being created. Created: created. Available: available.
- subnet
Ids List<String> - List of subnets in the VPC.
- support
Ipv4Gateway Boolean - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
List<Vpc
Tag> - update
Time String - Time when the VPC was updated.
- user
Cidr List<String>Blocks - User CIDR block of the VPC.
- vpc
Id String - ID of the VPC.
- vpc
Name String - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- account
Id string - ID of the account to which the VPC belongs.
- associate
Cens VpcAssociate Cen[] - cidr
Block string - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- creation
Time string - Time when the VPC was created.
- description string
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns
Servers string[] - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable
Ipv6 boolean - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4Gateway
Id string - ID of the IPv4 gateway bound to the VPC.
- ipv6Cidr
Block string - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- is
Default boolean - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- nat
Gateway string[]Ids - ID of the NAT gateway created in the VPC.
- network
Acl stringNum - Number of network ACLs in the VPC.
- project
Name string - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- route
Table string[]Ids - ID of the route table associated with the VPC.
- secondary
Cidr string[]Blocks - Secondary CIDR block of the VPC.
- security
Group string[]Ids - List of security groups in the VPC.
- status string
- Status of the VPC. Creating: being created. Created: created. Available: available.
- subnet
Ids string[] - List of subnets in the VPC.
- support
Ipv4Gateway boolean - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
Vpc
Tag[] - update
Time string - Time when the VPC was updated.
- user
Cidr string[]Blocks - User CIDR block of the VPC.
- vpc
Id string - ID of the VPC.
- vpc
Name string - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- account_
id str - ID of the account to which the VPC belongs.
- associate_
cens Sequence[VpcAssociate Cen Args] - cidr_
block str - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- creation_
time str - Time when the VPC was created.
- description str
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns_
servers Sequence[str] - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable_
ipv6 bool - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4_
gateway_ strid - ID of the IPv4 gateway bound to the VPC.
- ipv6_
cidr_ strblock - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- is_
default bool - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- nat_
gateway_ Sequence[str]ids - ID of the NAT gateway created in the VPC.
- network_
acl_ strnum - Number of network ACLs in the VPC.
- project_
name str - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- route_
table_ Sequence[str]ids - ID of the route table associated with the VPC.
- secondary_
cidr_ Sequence[str]blocks - Secondary CIDR block of the VPC.
- security_
group_ Sequence[str]ids - List of security groups in the VPC.
- status str
- Status of the VPC. Creating: being created. Created: created. Available: available.
- subnet_
ids Sequence[str] - List of subnets in the VPC.
- support_
ipv4_ boolgateway - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
-
Sequence[Vpc
Tag Args] - update_
time str - Time when the VPC was updated.
- user_
cidr_ Sequence[str]blocks - User CIDR block of the VPC.
- vpc_
id str - ID of the VPC.
- vpc_
name str - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
- account
Id String - ID of the account to which the VPC belongs.
- associate
Cens List<Property Map> - cidr
Block String - IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
- creation
Time String - Time when the VPC was created.
- description String
- Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
- dns
Servers List<String> - DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
- enable
Ipv6 Boolean - Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
- ipv4Gateway
Id String - ID of the IPv4 gateway bound to the VPC.
- ipv6Cidr
Block String - IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
- is
Default Boolean - Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
- nat
Gateway List<String>Ids - ID of the NAT gateway created in the VPC.
- network
Acl StringNum - Number of network ACLs in the VPC.
- project
Name String - Name of the project to which the VPC belongs. If not specified, it is added to the default project.
- route
Table List<String>Ids - ID of the route table associated with the VPC.
- secondary
Cidr List<String>Blocks - Secondary CIDR block of the VPC.
- security
Group List<String>Ids - List of security groups in the VPC.
- status String
- Status of the VPC. Creating: being created. Created: created. Available: available.
- subnet
Ids List<String> - List of subnets in the VPC.
- support
Ipv4Gateway Boolean - Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
- List<Property Map>
- update
Time String - Time when the VPC was updated.
- user
Cidr List<String>Blocks - User CIDR block of the VPC.
- vpc
Id String - ID of the VPC.
- vpc
Name String - Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
Supporting Types
VpcAssociateCen, VpcAssociateCenArgs
- Cen
Id string - ID of the CEN.
- Cen
Owner stringId - User ID of the CEN.
- Cen
Status string - Status of the VPC in the CEN. Loading: loading, Loaded: loaded
- Cen
Id string - ID of the CEN.
- Cen
Owner stringId - User ID of the CEN.
- Cen
Status string - Status of the VPC in the CEN. Loading: loading, Loaded: loaded
- cen
Id String - ID of the CEN.
- cen
Owner StringId - User ID of the CEN.
- cen
Status String - Status of the VPC in the CEN. Loading: loading, Loaded: loaded
- cen
Id string - ID of the CEN.
- cen
Owner stringId - User ID of the CEN.
- cen
Status string - Status of the VPC in the CEN. Loading: loading, Loaded: loaded
- cen_
id str - ID of the CEN.
- cen_
owner_ strid - User ID of the CEN.
- cen_
status str - Status of the VPC in the CEN. Loading: loading, Loaded: loaded
- cen
Id String - ID of the CEN.
- cen
Owner StringId - User ID of the CEN.
- cen
Status String - Status of the VPC in the CEN. Loading: loading, Loaded: loaded
VpcTag, VpcTagArgs
Import
$ pulumi import volcenginecc:vpc/vpc:Vpc example "vpc_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
