Skip to content

Instantly share code, notes, and snippets.

@garo
Created August 31, 2016 09:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garo/f43fffba012b475eb848b774d462d54c to your computer and use it in GitHub Desktop.
Save garo/f43fffba012b475eb848b774d462d54c to your computer and use it in GitHub Desktop.
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