esc icon indicating copy to clipboard operation
esc copied to clipboard

Support reading configs and secrets value from `stdin`

Open aureq opened this issue 1 year ago • 1 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Currently, when calling esc env set ... --secret, the secret value needs to be provided via the CLI. This is a problem because on MacOS and Linux, the whole command is stored in the shell history file and in plain text.

Like pulumi config set --secret, it would be great if this CLI could support the following ways to provide a value .

  • cat file.txt | esc env set aws-ts-demo-with-policy apiKey --secret
  • esc env set aws-ts-demo-with-policy apiKey --secret < file.txt

Affected area/feature

  • config
  • secret

aureq avatar Jan 31 '24 02:01 aureq

I'm not sure if there's a supported way to read from stdin yet, but you can already set the values via a prompt if you use esc env edit <env name>.

I do like the idea of having a per-value prompt for secrets as well. I'm going to open a separate issue for that feature to make sure we don't lose this feedback.

lblackstone avatar Jan 31 '24 17:01 lblackstone