don't apply unchanged attributes from legacy diffs

If a legacy diff has equal old and new values, don't apply the diff.
These would show up in sets, because of the overall change in set key.
This commit is contained in:
James Bardin 2018-11-01 16:14:23 -04:00
parent e91f381cc4
commit 7e4f09c787
1 changed files with 5 additions and 0 deletions

View File

@ -457,6 +457,11 @@ func (d *InstanceDiff) ApplyToValue(base cty.Value, schema *configschema.Block)
continue continue
} }
// sometimes helper/schema gives us values that aren't really a diff
if diff.Old == diff.New {
continue
}
attrs[attr] = diff.New attrs[attr] = diff.New
} }