Open VenelinMartinov opened 4 months ago
Yes, somewhat of a known unfortunate issue, thanks for documenting this. This would benefit from fully worked examples and impact. For an attribute of this type:
TF has 5 unknown
, nil
, []
, [{"foo": "bar"}]
states.
Pulumi has 4 unknown
, nil
, {"foo": "bar"}
states.
We cannot turnaround or map 1:1, but we can decide whether Pulumi nil should map to nil
or to []
, how does it map currently, and what are the trade-offs.
What happened?
Combining MaxItemsOne with ConfigModeAttr yields inexpressible values in pulumi land because of MaxItemsOne flattening.
Azure classic is a provider which uses ConfigModeAttr quite a bit so might be a good place to look for examples of real world usage.
Example
schema:
in terraform we can pass:
but on pulumi side we can either not specify it, pass
x=nil
orx=non-nil
.These map to nil, nil, and non-nil respectively but none of them map to [].
Output of
pulumi about
.
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).