I'm trying to switch backends from a local backend back to Pulumi cloud, but following the given instructions results in me logging back in to my local backend
(I'm aware that my first command has a typo - I'm specifically referring to the behaviour of the
pulumi login
command logging me into my last backend rather than pulumi cloud)
Copy code
± pulumi login <https://app.pulumi.com/>
error: <https://app.pulumi.com/> is not a valid self-hosted backend, use `pulumi login` without arguments to log into the Pulumi Cloud backend
± pulumi login
Logged in to einstein as connor (file:///home/connor/echobox/repos/infrastructure/stacks/original-main-account/main-vpc/.localstate/)
late-balloon-24601
05/20/2024, 4:20 PM
I was able to manually modify
~/.pulumi/credentials.json
to set
current: "<https://api.pulumi.com>"
which appears to have fixed it, but behaviour differs from the docs
c
clever-sunset-76585
05/20/2024, 4:21 PM
The cloud backend URL should be
api...
and not
app...
.
pulumi login <https://api.pulumi.com/>
l
late-balloon-24601
05/20/2024, 4:22 PM
I'm aware, but the docs and the CLI both state that
pulumi login
should log you into the cloud by default, which doesn't seem to be the case
c
clever-sunset-76585
05/20/2024, 4:23 PM
Yeah the docs on that may not be clear that running
pulumi login
will log you into the previously logged-in backend. You should explicitly
pulumi logout <backend url>
for it to default to logging you into the cloud backend.
l
late-balloon-24601
05/20/2024, 4:23 PM
ahh I see, that makes sense, yeah the docs could do with a bit of updating there, thanks
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.