Skip to content

Commit b043b75

Browse files
author
bgeesaman
authored
Merge pull request #37 from swatimurarka-tudip/zone-error
Replaced the zone parameter with location
2 parents 22d684f + a2c9c44 commit b043b75

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

terraform/main.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
// Provides access to available Google Container Engine versions in a zone for a given project.
1818
// https://www.terraform.io/docs/providers/google/d/google_container_engine_versions.html
1919
data "google_container_engine_versions" "on-prem" {
20-
zone = var.zone
20+
location = var.zone
2121
project = var.project
2222
}
2323

@@ -27,7 +27,7 @@ data "google_container_engine_versions" "on-prem" {
2727
// Create the GKE Cluster
2828
resource "google_container_cluster" "primary" {
2929
name = "tracing-demo-space"
30-
zone = var.zone
30+
location = var.zone
3131
initial_node_count = 1
3232
min_master_version = data.google_container_engine_versions.on-prem.latest_master_version
3333

@@ -50,7 +50,7 @@ resource "google_container_cluster" "primary" {
5050
// Here we use gcloud to gather authentication information about our new cluster and write that
5151
// information to kubectls config file
5252
provisioner "local-exec" {
53-
command = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --zone ${google_container_cluster.primary.zone} --project ${var.project}"
53+
command = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --zone ${google_container_cluster.primary.location} --project ${var.project}"
5454
}
5555
}
5656

@@ -71,6 +71,5 @@ output "cluster_name" {
7171
}
7272

7373
output "primary_zone" {
74-
value = google_container_cluster.primary.zone
74+
value = google_container_cluster.primary.location
7575
}
76-

0 commit comments

Comments
 (0)