On this page
alicloud_vpcs
The VPCs data source lists a number of VPCs resource information owned by an Alicloud account.
Example Usage
data "alicloud_vpcs" "multi_vpc"{
cidr_block="172.16.0.0/12"
status="Available"
name_regex="^foo"
}
Argument Reference
The following arguments are supported:
cidr_block
- (Optional) Limit search to specific cidr block,like "172.16.0.0/12".status
- (Optional) Limit search to specific status - valid value is "Pending" or "Available".name_regex
- (Optional) A regex string of VPC name.is_default
- (Optional) Whether the VPC is the default VPC in the specified region - valid value is true or false.vswitch_id
- (Optional) Retrieving VPC according to the specified VSwitch.output_file
- (Optional) The name of file that can save vpcs data source after runningterraform plan
.
Attributes Reference
The following attributes are exported:
id
- ID of the VPC.region_id
- ID of the region where VPC belongs.status
- Status of the VPC.vpc_name
- Name of the VPC.vswitch_ids
- List of VSwitch IDs in the specified VPCcidr_block
- CIDR block of the VPC.vrouter_id
- ID of the VRouterroute_table_id
- Route table ID of the VRouterdescription
- Description of the VPCis_default
- Whether the VPC is the default VPC in the belonging region.creation_time
- Time of creation.
© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/alicloud/d/vpcs.html