You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complex types that have object elements or attributes that contain optional attributes (a map of objects with optional attributes, an object with an object attribute that has optional attributes, etc.) should be surfaced as a value without optional attributes when surfaced from msgpack or JSON.
Actual Behavior
The values retain their type constraints as types, instead of the actual type. Meaning they'd still have optional attributes as part of their type, instead of their concrete type.
Upon investigation, it looks like the only real problem here is that if we have an Object with OptionalAttributes, the msgpackUnmarshal code for null/unknown values will preserve the OptionalAttributes. DynamicPseudoType seems to be handled correctly. Objects that have values besides unknown/null have their OptionalAttributes stripped appropriately.
terraform-plugin-go version
Expected Behavior
Complex types that have object elements or attributes that contain optional attributes (a map of objects with optional attributes, an object with an object attribute that has optional attributes, etc.) should be surfaced as a value without optional attributes when surfaced from msgpack or JSON.
Actual Behavior
The values retain their type constraints as types, instead of the actual type. Meaning they'd still have optional attributes as part of their type, instead of their concrete type.
References
The text was updated successfully, but these errors were encountered: