diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 3fe2b11dd..48289957a 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -3250,7 +3250,7 @@ func TestContext2Apply_multiProviderDestroy(t *testing.T) { ResourceTypes: map[string]*configschema.Block{ "vault_instance": { Attributes: map[string]*configschema.Attribute{ - "id": {Type: cty.String, Computed: true}, + "id": {Type: cty.String, Computed: true}, }, }, }, @@ -3900,6 +3900,16 @@ func TestContext2Apply_multiVarMissingState(t *testing.T) { p := testProvider("test") p.ApplyFn = testApplyFn p.DiffFn = testDiffFn + p.GetSchemaReturn = &ProviderSchema{ + ResourceTypes: map[string]*configschema.Block{ + "test_thing": { + Attributes: map[string]*configschema.Attribute{ + "a_ids": {Type: cty.String, Optional: true}, + "id": {Type: cty.String, Computed: true}, + }, + }, + }, + } // First, apply with a count of 3 ctx := testContext2(t, &ContextOpts{ diff --git a/terraform/test-fixtures/apply-multi-var-missing-state/child/child.tf b/terraform/test-fixtures/apply-multi-var-missing-state/child/child.tf index 928018627..b5df05d0e 100644 --- a/terraform/test-fixtures/apply-multi-var-missing-state/child/child.tf +++ b/terraform/test-fixtures/apply-multi-var-missing-state/child/child.tf @@ -11,5 +11,5 @@ resource "test_thing" "a" { # over all of the resource in the state. This should succeed even though the # module state will be nil when evaluating the variable. resource "test_thing" "b" { - a_ids = "${join(" ", null_resource.a.*.id)}" + a_ids = "${join(" ", test_thing.a.*.id)}" }