mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-20 12:02:01 -04:00
Structured Plan Renderer: Add tests validating behaviour of dynamic types (#32482)
* add support for dynamic types into attribute processing * fix names * add tests
This commit is contained in:
@@ -49,6 +49,12 @@ func (v Value) computeChangeForType(ctype cty.Type) change.Change {
|
||||
|
||||
switch {
|
||||
case ctype == cty.NilType, ctype == cty.DynamicPseudoType:
|
||||
// Forward nil or dynamic types over to be processed as outputs.
|
||||
// There is nothing particularly special about the way outputs are
|
||||
// processed that make this unsafe, we could just as easily call this
|
||||
// function computeChangeForDynamicValues(), but external callers will
|
||||
// only be in this situation when processing outputs so this function
|
||||
// is named for their benefit.
|
||||
return v.ComputeChangeForOutput()
|
||||
case ctype.IsPrimitiveType():
|
||||
return v.computeAttributeChangeAsPrimitive(ctype)
|
||||
|
||||
Reference in New Issue
Block a user