opentofu/terraform/test-fixtures/apply-provisioner-multi-self-ref-single/main.tf
Mitchell Hashimoto f50c7acf95
terraform: record dependency to self (other index)
Fixes #10313

The new graph wasn't properly recording resource dependencies to a
specific index of itself. For example: `foo.bar.2` depending on
`foo.bar.0` wasn't shown in the state when it should've been.

This adds a test to verify this and fixes it.
2016-11-23 09:25:20 -08:00

10 lines
196 B
HCL

resource "aws_instance" "foo" {
count = 3
foo = "number ${count.index}"
provisioner "shell" {
command = "${aws_instance.foo.0.foo}"
order = "${count.index}"
}
}