github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  }