github.com/wikibal01/hashicorp-terraform@v0.11.12-beta1/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  }