I originally asked in <#CRFUR2DGB|google-cloud> si...
# general
d
I originally asked in #google-cloud since that's the provider I was using, but I think there's not as much people there, so I'll re-ask here I'm using Pulumi to deploy some Virtual Machines which have persistent disks attached, so they must be deleted before being replaced (with the
deleteBeforeReplace
option). During one Pulumi run, the VMs were deleted and then another resource failed to be deployed (Cloud Build, build failed -- sometimes common) and during all subsequent runs, Pulumi complains that it cannot replace those Virtual Machines because they do not exist (because it deleted them)
Copy code
error: deleting urn:pulumi:staging::x::gcp:compute/network:Network$gcp:compute/subnetwork:Subnetwork$gcp:compute/instance:Instance::x: 1 error occurred:
	* Error deleting instance: googleapi: Error 404: The resource 'x-c5913e9' was not found, notFound


error: deleting urn:pulumi:staging::z::gcp:compute/network:Network$gcp:compute/subnetwork:Subnetwork$gcp:compute/instance:Instance::y: 1 error occurred:
	* Error deleting instance: googleapi: Error 404: The resource 'y-2506283' was not found, notFound


error: deleting urn:pulumi:staging::z::gcp:compute/network:Network$gcp:serviceAccount/account:Account$gcp:compute/instance:Instance::z: 1 error occurred:
	* Error deleting instance: googleapi: Error 404: The resource 'z-c86f123' was not found, notFound
It seems like that a
pulumi refresh
should help, but it does not:
Copy code
~  gcp:compute:Instance z refreshing (0s) 
...
The VM definitely does not exist within the cloud provider's console either How can I move forward without directly manipulating the Stack state ?