04/19/2021, 11:43 AM
I added
to an Aurora cluster already managed via pulumi, expecting it would just re-create the cluster. However it tried to "replace" it before deleting the old one (and fell over with an error from AWS). In an attempted workaround, I deleted the instance and cluster in the console, and then tried to delete the instance manally in pulumi, but this fails with an error:
pulumi state delete urn:pulumi:<redacted-cluster-instance>
error: No such resource "urn:pulumi:<redacted-cluster-instance>" exists in the current state
However when I run --show-urns, I can clearly see the state exists. Indeed if I run destroy on the stack, i now get:
error: deleting urn:pulumi:<redacted-cluster-instance>: 1 error occurred:
    	* error deleting Database Instance "<redacted-cluster-instance>": DBInstanceNotFound: DBInstance <redacted> not found.
I know neither the cluster nor the instance exist on AWS any more... how can I instruct pulumi to force remove that state?
I know I can
stack rm --force
but I have about 50 other resources in the stack which also need to be removed from AWS, not just pulumi state
OK, so
pulumi state delete <cluster-instance-urn>
wasn't working because the urn had a $ char in it which wasn't properly escaped 🤦‍♂️


04/19/2021, 3:32 PM
I think
pulumi refresh
might’ve also helped clear this up


04/19/2021, 11:41 PM
Thanks @red-match-15116 - that's one thing I didn't try 🙂 I'll remember it for next time