Skip to content

Instantly share code, notes, and snippets.

@garo
Created August 31, 2016 09:05
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
variable "cats" {
type = "map"
default = {
"0" = "grumpycat"
"1" = "snellacat"
}
}
variable "dogs" {
type = "map"
default = {
"0" = "doge"
"1" = "husky"
}
}
resource "aws_sns_topic" "test" {
name = "messages-from-${lookup(var.cats, count.index)}-to-${lookup(var.dogs, count.index)}"
count = "${length(var.cats)}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment