Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

Change zone as location #35

Merged
merged 1 commit into from
Jun 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ limitations under the License.
// Provides access to available Google Container Engine versions in a zone for a given project.
// https://www.terraform.io/docs/providers/google/d/google_container_engine_versions.html
data "google_container_engine_versions" "on-prem" {
zone = var.zone
project = var.project
location = var.zone
project = var.project
}

///////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -68,7 +68,7 @@ resource "google_bigquery_dataset" "gke-bigquery-dataset" {
// https://www.terraform.io/docs/providers/google/d/google_container_cluster.html
resource "google_container_cluster" "primary" {
name = "stackdriver-logging"
zone = var.zone
location = var.zone
initial_node_count = 2
min_master_version = data.google_container_engine_versions.on-prem.latest_master_version

Expand All @@ -84,7 +84,7 @@ resource "google_container_cluster" "primary" {
// These local-execs are used to provision the sample service
// These local-execs are used to provision the sample service
provisioner "local-exec" {
command = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --zone ${google_container_cluster.primary.zone} --project ${var.project}"
command = "gcloud container clusters get-credentials ${google_container_cluster.primary.name} --zone ${google_container_cluster.primary.location} --project ${var.project}"
}

provisioner "local-exec" {
Expand Down