Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mildwonkey committed Feb 18, 2021
1 parent 4145741 commit 0f4186e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions command/format/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion command/format/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0f4186e

Please sign in to comment.