diff --git a/terraform/graph_builder_apply_test.go b/terraform/graph_builder_apply_test.go index 6c384a9f4..ff6d71e28 100644 --- a/terraform/graph_builder_apply_test.go +++ b/terraform/graph_builder_apply_test.go @@ -50,6 +50,15 @@ func TestApplyGraphBuilder(t *testing.T) { }, }, }, + + "aws_instance.other": &InstanceDiff{ + Attributes: map[string]*ResourceAttrDiff{ + "name": &ResourceAttrDiff{ + Old: "", + New: "foo", + }, + }, + }, }, }, }, @@ -87,11 +96,14 @@ aws_instance.other module.child.aws_instance.create module.child.provider.aws provisioner.exec +module.child.aws_instance.other + module.child.aws_instance.create + module.child.provider.aws module.child.provider.aws provider.aws provider.aws provisioner.exec root aws_instance.other - module.child.aws_instance.create + module.child.aws_instance.other ` diff --git a/terraform/test-fixtures/graph-builder-apply-basic/child/main.tf b/terraform/test-fixtures/graph-builder-apply-basic/child/main.tf index e486aaa2c..b802817b8 100644 --- a/terraform/test-fixtures/graph-builder-apply-basic/child/main.tf +++ b/terraform/test-fixtures/graph-builder-apply-basic/child/main.tf @@ -1,3 +1,7 @@ resource "aws_instance" "create" { provisioner "exec" {} } + +resource "aws_instance" "other" { + value = "${aws_instance.create.id}" +}