https://pulumi.com logo
Title
d

damp-school-17708

03/25/2021, 12:03 PM
Hello, I am not sure what happened but one of our stacks is gone. I was wondering if there's a way to recover it from the backups (We use S3 as backend for state) I've downloaded the file but the import command doesn't work
error: could not deserialize deployment: unexpected end of JSON input
is there another command to restore a destroyed stack?
I guess this goes with this issue https://github.com/pulumi/pulumi/issues/6060
a

adorable-musician-67025

03/25/2021, 12:07 PM
if You still have
.pulumi
directory check subdirs for state. IMHO the best option is to enable bucket versioning to prevent such.
o

orange-secretary-87364

03/25/2021, 12:23 PM
I had this happen yesterday, I thought the stack was gone but it was just 'hidden' because
PULUMI_CONFIG_PASSPHRASE
wasn't set - try
pulumi --logtostderr -v5 stack ls
You're looking for a log like this
I0325 12:24:03.303733   61977 backend.go:859] error reading stack: <STACK_NAME> (decrypting secret value: failed to decrypt: incorrect passphrase, please set PULUMI_CONFIG_PASSPHRASE to the correct passphrase) skipping
d

damp-school-17708

03/25/2021, 2:41 PM
thanks the import from checkpoint worked 😅
I'll try the other way next time. the .pulumi folder might explain what happened, I fixed another issue (the one mentioned in the #aws channel of the wrong version of the aws plugin) by asking one of my engineers to remove the .pulumi folder..