HashiCorp Cloud Platform
hcp vault-secrets secrets create
Command: hcp vault-secrets secrets create
The hcp vault-secrets secrets create
command creates a new static secret
under a Vault Secrets application.
Usage
$ hcp vault-secrets secrets create NAME [Optional Flags]
Examples
Create a new secret in the Vault Secrets application on your active profile:
$ hcp vault-secrets secrets create secret_1 --data-file=tmp/secrets1.txt
Create a new secret in a Vault Secrets application by piping the plaintext secret from a command output:
$ echo -n "my super secret" | hcp vault-secrets secrets create secret_2 --data-file=-
Positional arguments
NAME
- The name of the secret to create.
Flags
--data-file=DATA_FILE_PATH
- File path to read secret data from. Set this to '-' to read the secret data from stdin.
Inherited Flags
--app=NAME
- The name of the Vault Secrets application. If not specified, the value from the active profile will be used.