Open VenelinMartinov opened 3 weeks ago
This one is not an issue with the detailed diff calculation:
detailedDiff=map[string]*pulumirpc.PropertyDiff{
"maxItemsOneBlock": &pulumirpc.PropertyDiff{
state: impl.MessageState{},
sizeCache: 0,
unknownFields: nil,
Kind: 4,
InputDiff: false,
},
"maxItemsOneBlock.prop": &pulumirpc.PropertyDiff{
state: impl.MessageState{},
sizeCache: 0,
unknownFields: nil,
Kind: 4,
InputDiff: false,
},
}
There is no defaults marked here - instead this seems to be an issue with the news - the block object contains the defaults key when it looks like there is no reason for that: https://github.com/pulumi/pulumi-terraform-bridge/blob/6b95c60de71a628bf0d2dbed288198c9d91474f2/pkg/tfbridge/schema.go#L131
Non-top level defaults don't seem to get used anywhere.
Also: https://github.com/pulumi/pulumi-terraform-bridge/blob/6b95c60de71a628bf0d2dbed288198c9d91474f2/pkg/tfbridge/schema.go#L1749 suggests the __defaults are not necessary.
Perhaps we can remove all empty nested defaults arrays.
this is all sidestepped if we only return the bottom-most property which has a diff, instead of all the properties in the tree - this works so much better.
What happened?
When adding/removing elements from a block type we seem to display a diff on the
__defaults
:Example
https://github.com/pulumi/pulumi-terraform-bridge/pull/2398
list block element added back
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).