Open parth-da opened 3 months ago
Hi @parth-da. Thanks for reporting an issue. I suspect that you can work around this issue by running pulumi up --refresh
instead of pulumi up
. That will fetch the current size from gcp before running the pulumi up
.
Yes we can but is there a way to avoid refreshing the entire stack when running pulumi up
? That is, is there a way to specify a particular resource to always be refreshed when changes are applied? (I was unable to find one). For now, configuring retries in automated deployments works for us but is not ideal.
It's not idea, but you can use a targeted refresh:
pulumi refresh --target urn:pulumi:cluster.scratchc::cluster::gcp:sql/databaseInstance:DatabaseInstance::test-pg
(replacing the URN with your actual URN)
It's definitely a bug in the resource. There is no "in-code" resource option to specify a refresh before an update.
Describe what happened
CloudSQL for Postgres instances created with
diskAutoresize: true
always fail if the size of the database has changed since the last time they were updated via pulumi with:Re-running
pulumi up
however succeeds.It looks like pulumi caches the old disk size (not sure where since I couldn't find it in the output of
pulumi stack export
) and sends it to GCP which then rejects the request. The first run updates this cache allowing subsequent attempts to succeed.This is very similar to https://github.com/pulumi/pulumi-gcp/issues/549 except for the
ignoreChanges
part.Sample program
Do the same steps as in https://github.com/pulumi/pulumi-gcp/issues/549#issuecomment-810492088 (removing the
ignoreChanges
lines).Then re-run
pulumi up
after making some small change to the script. I was trying to set a database flag.Log output
Affected Resource(s)
CloudSQL for Postgres instances
Output of
pulumi about
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).