File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ layout : " google"
3
+ page_title : " Google: google_compute_regions"
4
+ sidebar_current : " docs-google-datasource-compute-regions"
5
+ description : |-
6
+ Provides a list of available Google Compute regions
7
+ ---
8
+
9
+ # google\_ compute\_ regions
10
+
11
+ Provides access to available Google Compute regions for a given project.
12
+ See more about [ regions and regions] ( https://cloud.google.com/compute/docs/regions-zones/ ) in the upstream docs.
13
+
14
+ ```
15
+ data "google_compute_regions" "available" {}
16
+
17
+ resource "google_compute_subnetwork" "cluster" {
18
+ count = "${length(data.google_compute_regions.available.names)}"
19
+ name = "my-network"
20
+ ip_cidr_range = "10.36.${count.index}.0/24"
21
+ network = "my-network"
22
+ region = "${data.google_compute_regions.available.names[count.index]}"
23
+ }
24
+ ```
25
+
26
+ ## Argument Reference
27
+
28
+ The following arguments are supported:
29
+
30
+ * ` project ` (Optional) - Project from which to list available regions. Defaults to project declared in the provider.
31
+ * ` status ` (Optional) - Allows to filter list of regions based on their current status. Status can be either ` UP ` or ` DOWN ` .
32
+ Defaults to no filtering (all available regions - both ` UP ` and ` DOWN ` ).
33
+
34
+ ## Attributes Reference
35
+
36
+ The following attribute is exported:
37
+
38
+ * ` names ` - A list of regions available in the given project
Original file line number Diff line number Diff line change 43
43
< li <%= sidebar_current ( "docs-google-datasource-project" ) %> >
44
44
< a href ="/docs/providers/google/d/google_project.html "> google_project</ a >
45
45
</ li >
46
+ < li <%= sidebar_current ( "docs-google-datasource-compute-regions" ) %> >
47
+ < a href ="/docs/providers/google/d/google_compute_regions.html "> google_compute_regions</ a >
48
+ </ li >
46
49
< li <%= sidebar_current ( "docs-google-datasource-compute-ssl-policy" ) %> >
47
50
< a href ="/docs/providers/google/d/datasource_compute_ssl_policy.html "> google_compute_ssl_policy</ a >
48
51
</ li >
You can’t perform that action at this time.
0 commit comments