github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/configs/configupgrade/testdata/valid/traversals/input/traversals.tf (about) 1 locals { 2 simple = "${test_instance.foo.bar}" 3 splat = "${test_instance.foo.*.bar}" 4 index = "${test_instance.foo.1.bar}" 5 6 after_simple = "${test_instance.foo.bar.0.baz}" 7 after_splat = "${test_instance.foo.*.bar.0.baz}" 8 after_index = "${test_instance.foo.1.bar.2.baz}" 9 10 non_ident_attr = "${test_instance.foo.bar.1baz}" 11 12 remote_state_output = "${data.terraform_remote_state.foo.bar}" 13 remote_state_attr = "${data.terraform_remote_state.foo.backend}" 14 remote_state_idx_output = "${data.terraform_remote_state.foo.1.bar}" 15 remote_state_idx_attr = "${data.terraform_remote_state.foo.1.backend}" 16 remote_state_splat_output = "${data.terraform_remote_state.foo.*.bar}" 17 remote_state_splat_attr = "${data.terraform_remote_state.foo.*.backend}" 18 19 has_index_should = "${test_instance.b.0.id}" 20 has_index_shouldnt = "${test_instance.c.0.id}" 21 no_index_should = "${test_instance.a.id}" 22 no_index_shouldnt = "${test_instance.c.id}" 23 24 has_index_shouldnt_data = "${data.terraform_remote_state.foo.0.backend}" 25 } 26 27 data "terraform_remote_state" "foo" { 28 # This is just here to make sure the schema for this gets loaded to 29 # support the remote_state_* checks above. 30 } 31 32 resource "test_instance" "a" { 33 count = 1 34 } 35 36 resource "test_instance" "b" { 37 count = "${var.count}" 38 } 39 40 resource "test_instance" "c" { 41 }