github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/terraform/test-fixtures/nested-resource-count-plan/main.tf (about)

     1  resource "aws_instance" "foo" {
     2    count = 2
     3  }
     4  
     5  resource "aws_instance" "bar" {
     6    count = "${length(aws_instance.foo.*.id)}"
     7  }
     8  
     9  resource "aws_instance" "baz" {
    10    count = "${length(aws_instance.bar.*.id)}"
    11  }