pulumi/cmd
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
..
lumidl Argument validation for CLI commands 2017-11-29 16:10:53 -08:00
config.go Humanize some outputs a little (#723) 2017-12-14 11:51:58 -08:00
config_test.go Save config information in Pulumi.yaml 2017-10-20 13:30:07 -07:00
debug_cmds.go Improve the overall cloud CLI experience 2017-12-02 14:34:42 -08:00
destroy.go Allow users to control if and how output is colorized. (#718) 2017-12-14 11:53:02 -08:00
init.go Argument validation for CLI commands 2017-11-29 16:10:53 -08:00
login.go Add a logout --all command (#673) 2017-12-08 12:14:14 -08:00
logout.go Make cloud authentication more intuitive (#738) 2017-12-16 07:49:41 -08:00
logs.go Improve the overall cloud CLI experience 2017-12-02 14:34:42 -08:00
logs_test.go Address PR feedback on #600 (#611) 2017-11-28 12:54:36 -08:00
preview.go Allow users to control if and how output is colorized. (#718) 2017-12-14 11:53:02 -08:00
pulumi.go Make cloud authentication more intuitive (#738) 2017-12-16 07:49:41 -08:00
stack.go Humanize some outputs a little (#723) 2017-12-14 11:51:58 -08:00
stack_init.go Make config a little less error prone 2017-12-13 10:46:54 -08:00
stack_ls.go Humanize some outputs a little (#723) 2017-12-14 11:51:58 -08:00
stack_output.go Pass more stack info to ExtraRuntimeValidation (#717) 2017-12-13 16:09:14 -08:00
stack_rm.go Make some updates based on CR feedback 2017-12-03 08:10:50 -08:00
stack_select.go Improve the overall cloud CLI experience 2017-12-02 14:34:42 -08:00
update.go Allow users to control if and how output is colorized. (#718) 2017-12-14 11:53:02 -08:00
util.go Make cloud authentication more intuitive (#738) 2017-12-16 07:49:41 -08:00
version.go Add a manifest to checkpoint files (#630) 2017-12-01 13:50:32 -08:00