mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 17:46:43 +00:00
1.5 KiB
1.5 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
Google: google_compute_zones | docs-google-datasource-compute-zones | Provides a list of available Google Compute zones |
google_compute_zones
Provides access to available Google Compute zones in a region for a given project. See more about regions and zones in the upstream docs.
data "google_compute_zones" "available" {}
resource "google_compute_instance_group_manager" "foo" {
count = "${length(data.google_compute_zones.available.names)}"
name = "terraform-test-${count.index}"
instance_template = "${google_compute_instance_template.foobar.self_link}"
base_instance_name = "foobar-${count.index}"
zone = "${data.google_compute_zones.available.names[count.index]}"
target_size = 1
}
Argument Reference
The following arguments are supported:
project
(Optional) - Project from which to list available zones. Defaults to project declared in the provider.region
(Optional) - Region from which to list available zones. Defaults to region declared in the provider.status
(Optional) - Allows to filter list of zones based on their current status. Status can be eitherUP
orDOWN
. Defaults to no filtering (all available zones - bothUP
andDOWN
).
Attributes Reference
The following attribute is exported:
names
- A list of zones available in the given region