Skip to content

Commit

Permalink
tftypes: Further document Object type OptionalAttributes field usage
Browse files Browse the repository at this point in the history
Reference: #82
Reference: #83
Reference: #97
Reference: #128
  • Loading branch information
bflad committed Jan 31, 2022
1 parent 943f37f commit a86fe3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tftypes/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ type Object struct {
// are considered part of the type signature, and their absence means a
// value is no longer of that type.
//
// OptionalAttributes is only valid when declaring a type constraint
// (e.g. Schema) and should not be used as part of a Type when creating
// a Value (e.g. NewValue()). When creating a Value, all OptionalAttributes
// must still be defined in the Object by setting each attribute to a null
// value for its attribute type.
//
// The key of OptionalAttributes should be the name of the attribute
// that is optional. The value should be an empty struct, used only to
// indicate presence.
Expand Down

0 comments on commit a86fe3b

Please sign in to comment.