github.com/nevins-b/terraform@v0.3.8-0.20170215184714-bbae22007d5a/terraform/test-fixtures/plan-cdb-depends-datasource/main.tf (about) 1 resource "aws_instance" "foo" { 2 count = 2 3 num = "2" 4 compute = "${element(data.aws_vpc.bar.*.id, count.index)}" 5 lifecycle { create_before_destroy = true } 6 } 7 8 data "aws_vpc" "bar" { 9 count = 2 10 foo = "${count.index}" 11 }