Hi guys! If a pulumi resource hasn't been created ...
# general
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.
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
@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?