pulumi/pkg/backend
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
..
cloud Make cloud authentication more intuitive (#738) 2017-12-16 07:49:41 -08:00
local Allow users to control if and how output is colorized. (#718) 2017-12-14 11:53:02 -08:00
state Make config a little less error prone 2017-12-13 10:46:54 -08:00
backend.go Make some updates based on CR feedback 2017-12-03 08:10:50 -08:00
stack.go Make some updates based on CR feedback 2017-12-03 08:10:50 -08:00