juju add-secret
¶
Summary¶
Add a new secret.
Usage¶
juju add-secret [options] <name> [key[#base64|#file]=value...]
Options¶
Flag |
Default |
Usage |
---|---|---|
|
a YAML file containing secret key values |
|
|
the secret description |
|
|
Model to operate in. Accepts [<controller name>:]<model name>|<model UUID> |
Examples¶
juju add-secret my-apitoken token=34ae35facd4
juju add-secret my-secret key#base64=AA==
juju add-secret my-secret key#file=/path/to/file another-key=s3cret
juju add-secret db-password \
--info "my database password" \
data#base64=s3cret==
juju add-secret db-password \
--info "my database password" \
--file=/path/to/file
Details¶
Add a secret with a list of key values.
If a key has the ‘#base64’ suffix, the value is already in base64 format and no encoding will be performed, otherwise the value will be base64 encoded prior to being stored.
If a key has the ‘#file’ suffix, the value is read from the corresponding file.
A secret is owned by the model, meaning only the model admin can manage it, ie grant/revoke access, update, remove etc.