Hi, I'm trying to upgrade the `google-native` pac...
# google-cloud
b
Hi, I'm trying to upgrade the
google-native
package from version 0.18.0 to 0.31.1 and all of a sudden, pulumi wants to change the name of all my resources. Core parts of our infrastructure like static IP-address and k8s clusters are being updated or recreated. This triggers updates throughout the entire stack, even for non-google-native resources. Here's an example of a GlobalAddress being changed:
Copy code
~ google-native:compute/v1:GlobalAddress: (update)
    [id=<https://www.googleapis.com/compute/v1/projects/><redacted>/global/addresses/<redacted>-5afe1e3]
    [urn=urn:pulumi:dev::<redacted>::google-native:compute/v1:GlobalAddress::<redacted>]
    [provider=urn:pulumi:dev::<redacted>::pulumi:providers:google-native::default_0_31_1::<redacted>]
  ~ name: "<redacted>-5afe1e3" => "<redacted>-dc52ead"
The only thing changing here is the name. The exact same thing is happening to our k8s cluster, nodepools etc. It seems like I can avoid all of this by adding the following option to each resource:
Copy code
opts=pulumi.ResourceOptions(ignore_changes=["name"])
but that doesn't seem like a good idea (but it helps isolate the issue for me). Anyone else who has experienced something similar? And knows how to approach it? Thankful for any help Erik
hmm, I managed to get around this by exporting the stack to file, manually adding
"__autonamed": true,
to the inputs for all resources, and then importing the stack again.
This all seems to be an issue when moving from version
<=0.19.0
to
>=0.21.0
. The earlier versions don't add the
__autonamed
flag, whereas the later versions require it (or perhaps end up rendering a different random suffix).