https://pulumi.com logo
Title
r

refined-terabyte-65361

07/28/2021, 9:09 PM
Hi i accidentally cancelled pulumi deployment i tried to export the state and import it but now my stack is all messed up its referencing old pending_operations names all over the stack how to clean up pulumi stack and redo deployment from scratch ? i tried to remove the stack completely, by running 'pulumi stack rm but dint help
l

little-cartoon-10569

07/28/2021, 9:11 PM
You can export the stack, edit it to remove the pending operations (they're at the bottom), and import the stack.
Make backups.
m

many-yak-61188

07/28/2021, 9:12 PM
+1 you need to remove the pending operations before importing it back in
l

little-cartoon-10569

07/28/2021, 9:12 PM
(This is a #general question. This has affected other people, you may find more details by searching in that channel.)
👍 1
d

damp-school-17708

07/29/2021, 7:59 AM
It has probably been suggested already but a built-in command in pulumi to do this like 'pulumi dontcare' which does an export/remove-pending/import would be much appreciated - I end up doing this often, also thought about scripting it with jq for my project 🙂
w

witty-candle-66007

07/29/2021, 2:15 PM
Often in this case,
pulumi stack export | pulumi stack import
will clean things up.