diff --git a/command/format/diff.go b/command/format/diff.go index cc9ad70fcbf2..9c8a6fc6857b 100644 --- a/command/format/diff.go +++ b/command/format/diff.go @@ -374,6 +374,16 @@ func (p *blockBodyDiffPrinter) writeAttrDiff(name string, attrS *configschema.At return false } +// TODO: writeNestedAttrDiff will be responsible for properly formatting +// Attributes with NestedTypes in the diff. Right now, we are letting the +// existing formatter "just" print these attributes like regular, object-type +// attributes. Unlike the regular attribute printer, this function will need to +// descend into the NestedType to ensure that we are properly handling items +// such as: +// - nested sensitive fields +// - which nested field specifically requires replacement +// +// Examples of both can be seen in diff_test.go with FIXME comments. func (p *blockBodyDiffPrinter) writeNestedAttrDiff(name string, attrS *configschema.Attribute, old, new cty.Value, nameLen, indent int, path cty.Path) bool { panic("not implemented") } diff --git a/command/format/diff_test.go b/command/format/diff_test.go index f7afe5e26053..8c32f4593cea 100644 --- a/command/format/diff_test.go +++ b/command/format/diff_test.go @@ -326,7 +326,7 @@ new line Attributes: map[string]*configschema.Attribute{ "id": {Type: cty.String, Computed: true}, "password": {Type: cty.String, Optional: true, Sensitive: true}, - // TODO: This is a temporary situation; once the NestedType + // FIXME: This is a temporary situation; once the NestedType // specific printer is implemented this will need to be // updated so that only the sensitive nested attribute is // hidden.