-
Notifications
You must be signed in to change notification settings - Fork 50
Description
What happened?
I created some tests in this PR to show the issue. When the ignoreChanges option contains a wildcard (applies to lists, sets, and maps) the ignoreChanges is ignored by the bridge.
The code responsible is located here
This leads me to believe that the ignoreChanges logic is not needed in the bridge and we can rely on the ignoreChanges logic in core.
The current flow of ignoreChanges looks something like this:
- Resource created with a property
itemswith an initial value andignoreChanges: ['items[*].weight']
{ "items": [{"weight": 100}, {"weight": 200}] }- Value changed to be
{ "items": [{"weight": 300}, {"weight": 200}] }coreprocessesignoreChangesand passes the old inputs toCheck
{ "items": [{"weight": 100}, {"weight": 200}] }bridgeruns the Terraform plan and if there is a plan where there is a diff due toitems[*].weightit will delete that from the plan. In this case sincecorereset the values, there will not be a diff.
Example
See examples in linked PR.
Output of pulumi about
NA
Additional context
For future reference, if we ever think we need to update something related to ignoreChanges in the bridge, we should first see if it can be fixed in core. We currently think there are cases that can't be fixed in core, but they are not enumerated anywhere.
If we want to try and remove ignoreChanges logic from the bridge we will need a test suite that compares with/without.
related to:
pulumi/pulumi#20447
pulumi/pulumi-aws#5798
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).