Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.