-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update Registry to respect provider aliases #7166
Conversation
It feels like this will behave subtly differently than other aliases, and I'm not sure that's what we want. For other resource types, an alias just means "consider this resource to have the same identity as the resource in the old state". For providers, that identity influences a couple things:
I think that your changes address (1)--updating the provider map ensures that resources in the old state will treat the new provider as having the same identity as their provider if it has been aliased--but I'm not sure that it addresses (2). I think that the referenced issue requires that (2) is fixed. Can you add a test for that scenario? |
Just tested (2) out and you are correct, altering the provider results in it getting replaced but not the resources that depend on it. Do have any suggestions on what layer to look at for addressing (2)? |
Hey @EvanBoyle I was super excited to see you working on a fix for this. Any chance it will be landing soonish? |
Update, it looks like the incorrect behavior for (2) in my test program is due to pulumi/pulumi-terraform-bridge#244 I'll write some lifecycle tests for (2) to verify. |
…espectProviderAliases
… dependent replacement
@pgavlin I've added a passing test that covers those two scenarios, would you mind taking another look? |
…espectProviderAliases
Description
This change makes the provider registry aware of aliases. This allows provider aliases to work properly, ensuring that resources that use aliased providers don't get replaced unnecessarily.
Fixes #3979
Checklist