pulumi/pkg/workspace
Joe Duffy 6dc16a5548
Make cloud authentication more intuitive (#738)
The prior behavior with cloud authentication was a bit confusing
when authenticating against anything but https://pulumi.com/.  This
change fixes a few aspects of this:

* Improve error messages to differentiate between "authentication
  failed" and "you haven't logged into the target cloud URL."

* Default to the cloud you're currently authenticated with, rather
  than unconditionally selecting https://pulumi.com/.  This ensures

      $ pulumi login -c https://api.moolumi.io
      $ pulumi stack ls

  works, versus what was currently required

      $ pulumi login -c https://api.moolumi.io
      $ pulumi stack ls -c https://api.moolumi.io

  with confusing error messages if you forgot the second -c.

* To do this, our default cloud logic changes to

    1) Prefer the explicit -c if supplied;

    2) Otherwise, pick the "currently authenticated" cloud; this is
       the last cloud to have been targeted with pulumi login, or
       otherwise the single cloud in the list if there is only one;

    3) https://pulumi.com/ otherwise.
2017-12-16 07:49:41 -08:00
..
creds.go Make cloud authentication more intuitive (#738) 2017-12-16 07:49:41 -08:00
paths.go Issue an error when a project file isn't found 2017-12-06 17:26:45 -08:00
repository.go Add a few gas exceptions. 2017-11-24 16:14:43 -08:00
settings.go Improve the overall cloud CLI experience 2017-12-02 14:34:42 -08:00
workspace.go Fix cloud tests 2017-12-03 06:34:06 -08:00