Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider changing config verbs #552

Closed
joeduffy opened this issue Nov 13, 2017 · 5 comments
Closed

Consider changing config verbs #552

joeduffy opened this issue Nov 13, 2017 · 5 comments
Assignees
Labels
area/cli UX of using the CLI (args, output, logs)
Milestone

Comments

@joeduffy
Copy link
Member

We should consider some changes to our config commands.

First, we currently have text and secret; these are not verbs, so a little weird to use. We could consider set-text and set-secret.

Second, the asymmetry with having distinct setters, but a single getter, and furthermore having that getter named ls (which is short for "list") is a bit strange. We could have get-text and get-secret.

@joeduffy joeduffy added area/cli UX of using the CLI (args, output, logs) kind/suggestion labels Nov 13, 2017
@joeduffy joeduffy added this to the 0.9 milestone Nov 13, 2017
@chrsmith
Copy link
Contributor

How about just pulumi config set and pulumi config set-secret or pulumi config set --secret?

@ericrudder
Copy link
Member

ericrudder commented Nov 13, 2017 via email

@ellismg
Copy link
Contributor

ellismg commented Nov 13, 2017

For what it’s worth, the reason we had secret and text be siblings at the top level was we were afraid that having —secret would mean people would do the wrong thing by default for secrets. Putting them both at top level was trying to make the secrets system a little more discoverable.

@lukehoban
Copy link
Member

@ellismg I hear that - but in practice I don't feel like this difference is likely to change what users do (they'll still just learn to use text as a default cause it's easier) - and just makes the command more obtuse.

I think we should lean on dumber solutions. If we feel it's critical to encrypt as a default - we should make encrypting all config vars the default. If it's not - then --secret seems totally fine.

@joeduffy
Copy link
Member Author

I'm ok with that. It was good to try the experiment, it's just a little cumbersome to use in the wild.

ellismg added a commit that referenced this issue Nov 14, 2017
Move from two top level commands `text` and `secret` to a single `set`
command to set a value. To store a value encrypted, use `--secret` as
an argument to `set`.

Renames `ls` to `get`. The command is otherwise unchanged, so `get`
with no additional arguments will print all the configuration values
for a stack (in a table format), while `get <key-name>` will print the
value for that key by itself (useful for scripting).

Fixes #552
ellismg added a commit that referenced this issue Nov 15, 2017
A handful of UX improvments for config:

 - `pulumi config ls` has been removed. Now, `pulumi config` with no
   arguments prints the table of configuration values for a stack and
   a new command `pulumi config get <key>` prints the value for a
   single configuration key (useful for scripting).
 - `pulumi config text` and `pulumi config secret` have been merged
   into a single command `pulumi config set`. The flag `--secret` can
   be used to encrypt the value we store (like `pulumi config secret`
   used to do).
 - To make it obvious that setting a value with `pulumi config set` is
   in plan text, we now echo a message back to the user saying we
   added the configuration value in plaintext.

Fixes #552
ellismg added a commit that referenced this issue Nov 16, 2017
A handful of UX improvments for config:

 - `pulumi config ls` has been removed. Now, `pulumi config` with no
   arguments prints the table of configuration values for a stack and
   a new command `pulumi config get <key>` prints the value for a
   single configuration key (useful for scripting).
 - `pulumi config text` and `pulumi config secret` have been merged
   into a single command `pulumi config set`. The flag `--secret` can
   be used to encrypt the value we store (like `pulumi config secret`
   used to do).
 - To make it obvious that setting a value with `pulumi config set` is
   in plan text, we now echo a message back to the user saying we
   added the configuration value in plaintext.

Fixes #552
ellismg added a commit that referenced this issue Nov 16, 2017
A handful of UX improvments for config:

 - `pulumi config ls` has been removed. Now, `pulumi config` with no
   arguments prints the table of configuration values for a stack and
   a new command `pulumi config get <key>` prints the value for a
   single configuration key (useful for scripting).
 - `pulumi config text` and `pulumi config secret` have been merged
   into a single command `pulumi config set`. The flag `--secret` can
   be used to encrypt the value we store (like `pulumi config secret`
   used to do).
 - To make it obvious that setting a value with `pulumi config set` is
   in plan text, we now echo a message back to the user saying we
   added the configuration value in plaintext.

Fixes #552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli UX of using the CLI (args, output, logs)
Projects
None yet
Development

No branches or pull requests

5 participants