github.com/hugorut/terraform@v1.1.3/src/terraform/testdata/apply-multi-var-order/main.tf (about) 1 variable "num" { 2 default = 15 3 } 4 5 resource "aws_instance" "bar" { 6 count = "${var.num}" 7 foo = "index-${count.index}" 8 } 9 10 output "should-be-11" { 11 value = "${element(aws_instance.bar.*.foo, 11)}" 12 }