arvancloud_vpcs (Data Source)
Lists VPCs, optionally filtered by region.
Example Usage
# List all VPCs.
data "arvancloud_vpcs" "all" {}
output "all_vpcs" {
value = data.arvancloud_vpcs.all.vpcs
}
# List VPCs in a specific region.
data "arvancloud_vpcs" "ir_central" {
region = "ir-central1"
}
output "ir_central_vpcs" {
value = data.arvancloud_vpcs.ir_central.vpcs
}
output "ir_central_vpc_names" {
value = [for v in data.arvancloud_vpcs.ir_central.vpcs : v.name]
}
Schema
Optional
region(String) Filter VPCs by region code name (e.g.,ir-central1).
Read-Only
id(String) Unique identifier for this data source.vpcs(Attributes List) List of VPCs matching the specified filters. (see below for nested schema)
Nested Schema for vpcs
Read-Only:
cidr_block(String) CIDR block of the VPC.created_at(String) Timestamp when the VPC was created.id(String) Unique identifier of the VPC.name(String) Name of the VPC.region(String) Region where the VPC is located.state(String) Current state of the VPC.subnets(Attributes List) List of subnets within this VPC. (see below for nested schema)
Nested Schema for vpcs.subnets
Read-Only:
cidr_block(String) CIDR block of the subnet.id(String) Unique identifier of the subnet.name(String) Name of the subnet.state(String) Current state of the subnet.