This data source provides Alibaba Cloud regions.
data "alicloud_regions" "current_region_ds" {
current = true
}
output "current_region_id" {
value = "${data.alicloud_regions.current_region_ds.regions.0.id}"
}
The following arguments are supported:
name
- (Optional) The name of the region to select, such as eu-central-1
.current
- (Optional) Set to true to match only the region configured in the provider.output_file
- (Optional) File name where to save data source results (after running terraform plan
).The following attributes are exported in addition to the arguments listed above:
ids
- A list of region IDs.regions
- A list of regions. Each element contains the following attributes:
id
- ID of the region.local_name
- Name of the region in the local language.