Closed cl3nn closed 1 month ago
Hi @cl3nn, thank you for reporting this. We're sorry you're having trouble.
The likely cause for what you're seeing is that between these versions, the schema changed behavior slightly. Usually we would see this right away in the code itself and you'd be able to change it there; however it looks like this is affecting a provider default setting.
Could you please provide us with the following:
pulumi stack import --file stack.json
)Thank you so much!
Hi @guineveresaenger i cannot give you the complete stack state due to security reasons, but i've a redacted state of the working resource before the upgrade here: https://gist.github.com/cl3nn/7d05759a43250567beb4a0f2c5515641
A minimal resource was given, based on this example: https://www.pulumi.com/registry/packages/gcp/api-docs/compute/forwardingrule/#forwarding-rule-http-lb
hey @cl3nn - okay I think I have a workaround for you. 🤞
I managed to reproduce it on a smallerloadbalancer example; might be handy for testing.
Basically, what's happening is that v6 --> v7, the serviceDirectoryRegistrations
type changed from a list with a single item to an object. For me, upgrading from v6.67.1 (newest v6) --> v7.38.0 (the version you tried to upgrade to), I could reproduce the error.
When you recreate the stack from scratch using v7, the stack file reads "serviceDirectoryRegistrations": null,
not "serviceDirectoryRegistrations": [],
, like it does for v6.
This is all especially frustrating of course for a user who isn't even using this field!
We do have means to prevent this sort of thing. It appears as though at least at some point we (or probably the upstream provider) had a working state migration from v6 --> v7, which was lost by the time v7.38.0 was published. I discovered this because I initially attempted to upgrade v6.67.1 --> v7.0.0, which succeeds. The state for the offending field is updated to be the expected null object.
In summary:
You should be able to upgrade today, without any changes, if you do it in two steps, avoiding v7.38.0:
We will also very likely fix this universally to make sure we catch all state upgrades for everyone.
Describe what happened
When we update the Pulumi GCP provider from version 6 to either version 7 (7.38.0) or version 8 (8.3.1), we encounter an unusual error with the ForwardingRule resource during the pulumi preview step:
Everything works correctly when using Pulumi GCP version 6.67.1."
Sample program
problematic resource inside a ComponentResource:
Log output
when using pulumi/gcp 8.3.1
when using pulumi/gcp 7.38.0
Affected Resource(s)
No response
Output of
pulumi about
when using pulumi/gcp 8.3.1
when using pulumi/gcp 7.38.0
Additional context
No response
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).