In another weird state: - During `pulumi up` a de...
# typescript
g
In another weird state: • During
pulumi up
a delete that had other requirements was running, then errored so which canceled out of the script. • Tried to re-run
pulumi up
, and the state now hangs on that part. • Ran a
pulumi refresh
to see if it resolved any issues, fails on:
Copy code
error: the current deployment has 1 resource(s) with pending operations:
  * {URN}, interrupted while deleting
• Tried running
pulumi state delete {URN}
to manually remove problem resources, but get an error where it wants me to delete dependencies first but those dependencies don't exist anymore, so I cant technically delete them. Out of curiosity, is the best way to resolve this to run
pulumi stack export
fix the issues and reimport? Or is there a more elegant way to remove this corrupt state?
s
yes,
pulumi stack export > state.json
then clear the
pending_operations
array at the bottom then
pulumi state import -f state.json
if you run
pulumi state delete
it will just remove the resource from the statefile, but not remove it from your cloud env which might be a problem.
🙏 1
g
Thanks a ton Mike!
👍 1