Hey so our pulumi stack was on a cloud storage buc...
# general
a
Hey so our pulumi stack was on a cloud storage bucket, and while it was updating someone did ctrl ^c twice to mess up the state, now we can't find the stack anywhere when we do pulumi refresh, I can see the stack's folder in the cloud storage bucket... how do we proceed to restore the stack?
b
if your directory
<yourbucket>/.pulumi/stacks
has a file called
<yourstack>.json.bak
, you can copy that file and name the copy
<yourstack>.json
and it should be fine
pulumi always creates a backup file called
<thestack>.json.bak
before it tries to mess with the state file (
<thestack>.json
)
or, at least it should
it’s saved me a few times 😅
(note that I don’t work at or on Pulumi – I’ve just had the same problem a few times)
after making the copy, I strongly suggest immediately doing a
pulumi refresh
to make sure you get any state changes that were successfully applied before the
^C