I'm trying to switch backends from a local backend...
# getting-started
l
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/)
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
The cloud backend URL should be
api...
and not
app...
.
pulumi login <https://api.pulumi.com/>
l
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
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
ahh I see, that makes sense, yeah the docs could do with a bit of updating there, thanks