Stop printing value if it looks like a secret (#7327)

Stop printing secret value on `pulumi config set` if it thinks it may be a secret value. Instead, print the config key name.
This commit is contained in:
JasonWhall 2021-08-13 14:07:52 +01:00 committed by GitHub
parent ebb0e6aaed
commit 93be963d6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,7 @@
### Improvements
- [cli] Stop printing secret value on `pulumi config set` if it looks like a secret.
[#7327](https://github.com/pulumi/pulumi/pull/7327)
### Bug Fixes

View file

@ -526,9 +526,9 @@ func newConfigSetCmd(stack *string) *cobra.Command {
// If we saved a plaintext configuration value, and --plaintext was not passed, warn the user.
if !plaintext && looksLikeSecret(key, value) {
return errors.Errorf(
"config value '%s' looks like a secret; "+
"config value for '%s' looks like a secret; "+
"rerun with --secret to encrypt it, or --plaintext if you meant to store in plaintext",
value)
key)
}
}