Skip to content

Instantly share code, notes, and snippets.

@unfor19
Created September 24, 2019 09:03
Show Gist options
  • Save unfor19/10a22a1dac8567ee4f06578769b32e8e to your computer and use it in GitHub Desktop.
Save unfor19/10a22a1dac8567ee4f06578769b32e8e to your computer and use it in GitHub Desktop.
region name followed by abc
variable "region" {
type = map(string)
default = {
"development" = "us-west-2"
"qa" = "us-east-2"
"staging" = "us-east-1"
"production" = "ca-central-1"
}
}
module "vpc" {
# omitted arguments for brevity
azs = [
"${lookup(var.region, var.environment)}a",
"${lookup(var.region, var.environment)}b",
"${lookup(var.region, var.environment)}c",
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment