github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/configs/configupgrade/testdata/valid/indexed-splat/input/indexed-splat.tf (about)

     1  resource "test_instance" "first_many" {
     2    count = 2
     3  }
     4  
     5  resource "test_instance" "one" {
     6    image = "${test_instance.first_many.*.id[0]}"
     7  }
     8  
     9  resource "test_instance" "splat_of_one" {
    10    image = "${test_instance.one.*.id[0]}"
    11  }
    12  
    13  resource "test_instance" "second_many" {
    14    count = "${length(test_instance.first_many)}"
    15    security_groups = "${test_instance.first_many.*.id[count.index]}"
    16  }