Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IgnoreChanges unable to ignore set element changes #1756

Open
t0yv0 opened this issue Mar 12, 2024 · 1 comment
Open

IgnoreChanges unable to ignore set element changes #1756

t0yv0 opened this issue Mar 12, 2024 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@t0yv0
Copy link
Member

t0yv0 commented Mar 12, 2024

What happened?

Due to #1755 effect of how sets are represented in bridged providers, it is really impossible sometimes to ignore set updates using ignoreChanges.

IN programs like this: pulumi/pulumi-aws#2442 it is not unreasonable for the user to try to workaround incorrect provider diffs by saying this:

    {
        ignoreChanges: ["parameters[*].applyMethod"]
    }

However currently this fails to suppress the diffs in question. To the diff it looks like the elements are added and removed instead of changed in-place. Therefore the diff looks bigger than just applyMethod.

Example

See above

Output of pulumi about

N/A

Additional context

N/A

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).

@t0yv0
Copy link
Member Author

t0yv0 commented Apr 24, 2024

Still don't have a complete picture of how to interpret ignore_changes and implement this is intuitive. Might be worth digging into how TF does it for sets https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes

In particular I am curious if the set hash is exposed explicitly so you can reference the set hash (or element identity) in your ignoreChanges (currently it's not really user-facing in Pulumi bridged projection), and if not, what is done to correlate numeric indices to set elements and how does ignoreChanges interact with changes that would affect an element's identity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

1 participant