Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

Commit 60874d1

Browse files
author
bgeesaman
authored
Merge pull request #34 from swatimurarka-tudip/zone-error
Replaced zone with location
2 parents c7bf304 + 3ecd242 commit 60874d1

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

terraform/outputs.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ output "cluster_name" {
1818
value = google_container_cluster.primary.name
1919
}
2020

21-
output "primary_zone" {
22-
value = google_container_cluster.primary.zone
21+
output "primary_location" {
22+
value = google_container_cluster.primary.location
2323
}
24-

terraform/resources.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
https://www.apache.org/licenses/LICENSE-2.0
8+
https://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,13 +23,13 @@ limitations under the License.
2323
// Create the primary cluster for this project.
2424
///////////////////////////////////////////////////////////////////////////////////////
2525
data "google_container_engine_versions" "gke_versions" {
26-
zone = var.zone
26+
location = var.zone
2727
}
2828

2929
// Create the GKE Cluster
3030
resource "google_container_cluster" "primary" {
3131
name = "stackdriver-monitoring-tutorial"
32-
zone = var.zone
32+
location = var.zone
3333
initial_node_count = 1
3434
min_master_version = data.google_container_engine_versions.gke_versions.latest_master_version
3535

@@ -59,7 +59,7 @@ resource "google_container_cluster" "primary" {
5959
}
6060

6161
provisioner "local-exec" {
62-
command = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --zone ${google_container_cluster.primary.zone} --project ${var.project}"
62+
command = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --zone ${google_container_cluster.primary.location} --project ${var.project}"
6363
}
6464

6565
provisioner "local-exec" {
@@ -105,4 +105,3 @@ resource "google_project_service" "logging" {
105105
service = "logging.googleapis.com"
106106
disable_on_destroy = false
107107
}
108-

0 commit comments

Comments
 (0)