Last active
May 20, 2018 05:00
-
-
Save endofcake/e598fb6ba8cf2d376ca84894c1bc7da4 to your computer and use it in GitHub Desktop.
Environment maps in Terraform
This file contains hidden or 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
variable "instance_type" { | |
type = "map" | |
default = { | |
test = "m4.large" | |
uat = "m4.large" | |
prod = "m4.xlarge" | |
} | |
} | |
// <...> | |
module "ecs_cluster" { | |
// <...> | |
instance_type = "${lookup(var.instance_type, terraform.workspace)}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment