Created
June 21, 2019 06:48
-
-
Save klang/f3464f79f20e34c8959cf153c7c4c951 to your computer and use it in GitHub Desktop.
Terraform 0.12+ does not support "."'s in hash keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
project = "project-name" | |
env = { | |
# default.name = "default-workspace-name" # <= tf0.11 notation | |
default_name = "default-workspace-name" # <= tf0.12 notation | |
# other.name = "other-workspace-name" | |
other_name = "other-workspace-name" | |
} | |
name = "${lookup(local.env, "${terraform.workspace}_name")}" | |
} | |
output name { value = "${local.name}"} | |
# terraform workspace new other | |
# terraform apply -auto-approve | |
# terraform workspace select default | |
# terraform apply -auto-approve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment