HashiCorp Cloud Platform
Update static secrets
Static secrets are created as key/value pairs. Static secrets typically persist over long periods of time.
Refer to the Design a secret strategy documentation for information and tips on app and secret conventions.
Prerequisites
- An HCP IAM user or service principal with the HCP contributor role or higher.
- An HCP Vault Secrets app created.
- Authenticated to the HCP Portal or HCP CLI
Examples
Updating a static secret from the CLI uses the same command used to create a new static secret.
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=-