hi all, so I made a slight change to how we build ...
# kubernetes
l
hi all, so I made a slight change to how we build the kubernetes provider for our clusters, and now Pulumi wants to replace all resources managed by that provider. Even if I run "pulumi refresh" it doesn't seem to pick up the fact that the provider is the same. I can't really find anything in the docs on how to deal with this scenario, and replacing a bunch of stuff isn't really an option. Is there any way to fix this?
hm I can see both provider in my stack output. Do I have to manually update the refs maybe? THat sounds a bit dangerous...
hm the diff doesn't really show the provider details, so this is difficult to make sense of imho
I ended up reverting my code, and found that I could grab an older state from history (we use azure storage backends), make a small edit to the json and re-import it. Very surprised that it is so brittle, and I'm back to where I started in terms of replacing my provider 😞
q
What change did you make to the provider? Did you maybe change its name?
l
yeah, we switched building the provider in a separate class, so the name probably would have changed.
q
In that case you can use the
aliases
resource option to make the new provider point to the old one: https://www.pulumi.com/docs/iac/concepts/options/aliases/ If you do that, pulumi should handle it correctly
l
but point to the old one in terms of name only - is that enough?
q
Yeah that should be enough! You can either use the name or urn for the alias
l
its quite clunky for us to do so, it would have been better if we could do a one-time conversion, instead of having to leave residue to point to what was before. But I guess maybe the alias can be removed afterwards?
THanks for the help, I very much appreciate this. I'll do some testing in a throwaway stack to see how this behaves.