Created
August 31, 2016 09:44
-
-
Save garo/e216a9a9a8ee8b0271e2d946fa46f9a8 to your computer and use it in GitHub Desktop.
This file contains 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 "foo" { | |
default = ["1", "2", "3"] | |
} | |
variable "bar" { | |
default = ["a", "b", "c"] | |
} | |
resource "aws_sns_topic" "test" { | |
name = "${element(var.foo, count.index)}-${element(var.bar, count.index)}" | |
count = "${length(var.foo) * length(var.bar)}" | |
} |
This file contains 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
+ aws_sns_topic.test.0 | |
arn: "<computed>" | |
name: "1-a" | |
policy: "<computed>" | |
+ aws_sns_topic.test.1 | |
arn: "<computed>" | |
name: "2-b" | |
policy: "<computed>" | |
+ aws_sns_topic.test.2 | |
arn: "<computed>" | |
name: "3-c" | |
policy: "<computed>" | |
+ aws_sns_topic.test.3 | |
arn: "<computed>" | |
name: "1-a" | |
policy: "<computed>" | |
+ aws_sns_topic.test.4 | |
arn: "<computed>" | |
name: "2-b" | |
policy: "<computed>" | |
+ aws_sns_topic.test.5 | |
arn: "<computed>" | |
name: "3-c" | |
policy: "<computed>" | |
+ aws_sns_topic.test.6 | |
arn: "<computed>" | |
name: "1-a" | |
policy: "<computed>" | |
+ aws_sns_topic.test.7 | |
arn: "<computed>" | |
name: "2-b" | |
policy: "<computed>" | |
+ aws_sns_topic.test.8 | |
arn: "<computed>" | |
name: "3-c" | |
policy: "<computed>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment