diff --git a/terraform/context_plan_test.go b/terraform/context_plan_test.go index 53bd8136c..f5eadd40b 100644 --- a/terraform/context_plan_test.go +++ b/terraform/context_plan_test.go @@ -2267,12 +2267,12 @@ func TestContext2Plan_computedMultiIndex(t *testing.T) { case "aws_instance.foo[0]": checkVals(t, objectVal(t, schema, map[string]cty.Value{ "ip": cty.UnknownVal(cty.List(cty.String)), - "foo": cty.ListValEmpty(cty.String), + "foo": cty.NullVal(cty.List(cty.String)), }), ric.After) case "aws_instance.foo[1]": checkVals(t, objectVal(t, schema, map[string]cty.Value{ "ip": cty.UnknownVal(cty.List(cty.String)), - "foo": cty.ListValEmpty(cty.String), + "foo": cty.NullVal(cty.List(cty.String)), }), ric.After) case "aws_instance.bar[0]": checkVals(t, objectVal(t, schema, map[string]cty.Value{ diff --git a/terraform/diff.go b/terraform/diff.go index 58d5d9569..04cfaa0c7 100644 --- a/terraform/diff.go +++ b/terraform/diff.go @@ -497,7 +497,8 @@ func (d *InstanceDiff) blockDiff(path []string, attrs map[string]string, schema // we can only trust the diff for sets, since the path changes, so don't // count existing values as candidate keys. If it turns out we're - // keeping the + // keeping the attributes, we will check catch it down below with + // "keepBlock" after we check the set count. if block.Nesting != configschema.NestingSet { for k := range attrs { if strings.HasPrefix(k, blockKey) {