From 273f20ec8b398f8a6e458fb0fd427b7430edf00b Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 22 Jan 2019 18:38:17 -0500 Subject: [PATCH] update comment and fix core test One terraform test was broken when the result became more correct. --- terraform/context_plan_test.go | 4 ++-- terraform/diff.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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) {