Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Switching from format(%s-a, var.region) -> var.zone on the bastion te…
Browse files Browse the repository at this point in the history
…rraform resource. We already have zone as a variable and the previous doesn't work for the europe-west1 or us-east1 regions

Signed-off-by: simonbutt <[email protected]>
  • Loading branch information
simonbutt committed May 11, 2020
1 parent a65e7cc commit 12b27c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ data "template_file" "startup_script" {
resource "google_compute_instance" "bastion" {
name = local.hostname
machine_type = "g1-small"
zone = format("%s-a", var.region)
zone = var.zone
project = var.project
tags = ["bastion"]

Expand Down

1 comment on commit 12b27c3

@jkjm09
Copy link

@jkjm09 jkjm09 commented on 12b27c3 Aug 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also have to fix

if gcloud compute ssh ${local.hostname} --project ${var.project} --zone ${var.region}-a --command uptime; then

The code currently only works if you actually utilize zone a.

Please sign in to comment.