Hi, I would like some help upgrading the state. Cu...
# general
b
Hi, I would like some help upgrading the state. Currently the state is stored in S3, the last version of Pulumi which worked with the current state was 3.219.0. I’ve upgraded the Pulumi tool to version 3.274.1 and tried to login, it shows: “Legacy DIY state is deprecated, please upgrade your state to project mode using: ‘pulumi state upgrade’” But running this command doesn’t do anything. Is there another way to update, should I downgrade to a previous version of Pulumi?
e
What’s the layout of your state folder?
b
The structure inside is:
Copy code
.pulumi
 .pulumi/backups
 .pulumi/credentials.json
 .pulumi/stacks
...
e
is anything in stacks?
b
Yes, there are several json and bak files, all look like they correspond to my infrastructure stacks
e
and if you
stack ls
in 3.274.1 does it see them?
b
I cannot login to pulumi so I cannot see any stacks
e
but it worked on 3.219? and
stack ls
would list them?
b
Yes, I could log in and run the pulumi commands as usual.
e
but 3.220 doesn’t list the stacks anymore?
b
So, I downgraded the Pulumi tools to
3.219.0
again and could log in and list the stacks with
pulumi stack ls.
How can I migrate to projects from here?
I figured it out in github.com/pulumi/pulumi/issues/19566 Thanks
e
Ah good but what exactly was the issue?
b
The flag PULUMI_DIY_BACKEND_IGNORE_DEPRECATION_ERROR needed to be set before running the login command which is needed before the update command. Once the flag was set, I was able to login and run the update command.
e
Ah. I thought that flag was written out as part of the error so it would be easier to find.
b
Yes, it was, but I didn’t notice, or didn’t consider it for the login command.
e
Ah ok 🙂 glad you got it fixed in the end