mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Update docs of secrets set command
This commit is contained in:
@@ -186,12 +186,28 @@ This command allows you to set or update secrets in your environment. If the sec
|
||||
If the secret key does not exist, a new secret will be created using both the key and value provided.
|
||||
|
||||
```bash
|
||||
$ infisical secrets set <key1=value1> <key2=value2>...
|
||||
$ infisical secrets set <key1=value1> <key2=value2> <key3=@/path/to/file>...
|
||||
|
||||
## Example
|
||||
$ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jebhfbwe
|
||||
$ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jebhfbwe SECRET_PEM_KEY=@secret.pem
|
||||
```
|
||||
|
||||
<Tip>
|
||||
When setting secret values:
|
||||
- Use `secretName=@path/to/file` to load the secret value from a file
|
||||
- Use `secretName=\@value` if you need the literal '@' character at the beginning of your value
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
# Set a secret with the value loaded from a certificate file
|
||||
$ secrets set CERTIFICATE=@/path/to/certificate.pem
|
||||
|
||||
# Set a secret with the literal value "@example.com"
|
||||
$ secrets set email=\@example.com
|
||||
```
|
||||
</Tip>
|
||||
|
||||
### Flags
|
||||
|
||||
<Accordion title="--env">
|
||||
|
||||
Reference in New Issue
Block a user