mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Add support for sets in the structured renderer (#32409)
* prep for processing the structured run output * undo unwanted change to a json key * Add skeleton functions and API for refactored renderer * goimports * Fix documentation of the RenderOpts struct * Add rendering functionality for primitives to the structured renderer * add test case for override * Add support for parsing and rendering sensitive values in the renderer * Add support for unknown/computed values in the structured renderer * delete missing unit tests * Add support for object attributes in the structured renderer * goimports * Add support for the replace paths data in the structured renderer * Add support for maps in the structured renderer * Add support for lists in the structured renderer * goimports * Add support for sets in the structured renderer * goimports
This commit is contained in:
@@ -23,6 +23,8 @@ func (v Value) computeChangeForNestedAttribute(attribute *jsonprovider.NestedTyp
|
||||
return v.computeAttributeChangeAsNestedMap(attribute.Attributes)
|
||||
case "list":
|
||||
return v.computeAttributeChangeAsNestedList(attribute.Attributes)
|
||||
case "set":
|
||||
return v.computeAttributeChangeAsNestedSet(attribute.Attributes)
|
||||
default:
|
||||
panic("unrecognized nesting mode: " + attribute.NestingMode)
|
||||
}
|
||||
@@ -38,6 +40,8 @@ func (v Value) computeChangeForType(ctyType cty.Type) change.Change {
|
||||
return v.computeAttributeChangeAsMap(ctyType.ElementType())
|
||||
case ctyType.IsListType():
|
||||
return v.computeAttributeChangeAsList(ctyType.ElementType())
|
||||
case ctyType.IsSetType():
|
||||
return v.computeAttributeChangeAsSet(ctyType.ElementType())
|
||||
default:
|
||||
panic("unrecognized type: " + ctyType.FriendlyName())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user