diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index a8d9007f6..469075ed4 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -2075,6 +2075,42 @@ func TestContext2Apply_compute(t *testing.T) { p := testProvider("aws") p.ApplyFn = testApplyFn p.DiffFn = testDiffFn + p.GetSchemaReturn = &ProviderSchema{ + ResourceTypes: map[string]*configschema.Block{ + "aws_instance": { + Attributes: map[string]*configschema.Attribute{ + "num": { + Type: cty.Number, + Optional: true, + }, + "compute": { + Type: cty.String, + Optional: true, + }, + "compute_value": { + Type: cty.String, + Optional: true, + }, + "foo": { + Type: cty.String, + Optional: true, + }, + "id": { + Type: cty.String, + Computed: true, + }, + "type": { + Type: cty.String, + Computed: true, + }, + "value": { // Populated from compute_value because compute = "value" in the config fixture + Type: cty.String, + Computed: true, + }, + }, + }, + }, + } ctx := testContext2(t, &ContextOpts{ Config: m, diff --git a/terraform/terraform_test.go b/terraform/terraform_test.go index 1e5b4dfb6..7e5238ec8 100644 --- a/terraform/terraform_test.go +++ b/terraform/terraform_test.go @@ -431,7 +431,6 @@ aws_instance.bar: aws_instance.foo: ID = foo provider = provider.aws - compute = value num = 2 type = aws_instance value = computed_value