11/11/2019, 3:00 PM
Hi guys! If a pulumi resource hasn't been created properly and I want to force the redeploy. How can I do that? For example I couldn't create a GKE cluster, because of
Cluster "gke-cluster-1" has terminal state "ERROR" with message "Retry budget exhausted (10 attempts): Google Compute Engine: A route in one of the active peer networks hides the address space of the new subnetwork."
Now I want to recreate it, but I get
Plan apply failed: googleapi: Error 409: Already exists: projects/.../zones/europe-west3-c/clusters/gke-cluster-1., alreadyExists
I removed this resource from pulumi state directly with
pulumi state rm urn
, but the behaviour is the same.


11/11/2019, 5:07 PM
There is a a (relatively new) flag
pulumi up —replace <urn>
which can be used to force a specific resource to replace. There is also a
pulumi up —target-replace <urn>
to do just that replacement without processing any other update changes.
👍 2


11/12/2019, 8:55 AM
@white-balloon-205, thank you so much!
@white-balloon-205, sorry, but I have an additional question. If I deleted an urn from a pulumi state, the solutions above do not work. What would be the workaround there? So, GCP reports the resource exists, but it is not in a pulumi state. I think in this case it is a GCP limitation and it has nothing to do with pulumi, right?