https://pulumi.com logo
Title
l

loud-helicopter-75345

03/25/2021, 2:02 PM
Hi so switching to a local backend seems quite simple:
pulumi login --local
However I'm unclear on how to switch back again as this doesn't seem as simple. I'm currently at:
pulumi logout; pulumi login
Manage your Pulumi stacks by logging in.
Run `pulumi login --help` for alternative login options.
Enter your access token from <https://app.pulumi.com/account/tokens>
    or hit <ENTER> to log in using your browser                   :
Open the browser, login to pulumi.com, create a new token, paste it into the terminal. I already have a login and token so why is this needed? Is there something as simple as switching to a local backend? e.g.
pulumi login --standard
👀 1
b

brave-planet-10645

03/25/2021, 2:05 PM
At the moment you can only have one "global" backend on your machine, rather than one per project / stack etc. When you change backends it means when you next run
pulumi up
it'll be authenticating against whatever backend you last logged in to
a

adorable-musician-67025

03/25/2021, 2:06 PM
Ah, that should be my 6th question today!
b

brave-planet-10645

03/25/2021, 2:06 PM
And when you logout it therefore requires you to login (globally) before you can run a pulumi up again
a

adorable-musician-67025

03/25/2021, 2:06 PM
Why we can't have backend per project?
l

loud-helicopter-75345

03/25/2021, 2:06 PM
I actually want to use two logins for the same project
local for quicker testing but then --standard for the real thing.
b

brave-planet-10645

03/25/2021, 2:08 PM
So at the moment, you'll have to login and logout again to move between the two. I don't recommend it as it might cause your stack to get messed up. We do have an issue open discussing having multiple backends: https://github.com/pulumi/pulumi/issues/6029
l

loud-helicopter-75345

03/25/2021, 2:10 PM
Yeah I understand the possibility for confusion, but if I use different stack names it shouldn't be an issue. I just don't want the extra lag when testing.
Thank you for the link to the issue 🙂