secrets get
Command: vlt secrets get
Use the secrets get
command to retrieve the secret of a given key.
Examples
Retrieve the value of secret named "expiration" under the "company-card" application.
$ vlt secrets get --app-name="company-card" expiration
Tip
If the CLI is already configured to point to the "company-card" application via
vlt init
, you can omit the --app-name
parameter.
Example output:
Name Value Latest Version Created At
expiration **************** 1 2023-05-22T23:26:04.680Z
Use the --plaintext
parameter to retrieve the secret as plain text.
$ vlt secrets get --app-name="company-card" --plaintext expiration
October 2024
Warning
It is strongly recommended not to displaying the secret values on your terminal, and should use it only for validation purposes.
Usage
$ vlt secrets get [options] secret_name
Command options
--organization
(string: "")
- HCP organization that the application is in. Use-o
for its shorthand.--project
(string: "")
- HCP project that the application is in. Use-p
for its shorthand.--app-name
(string: "")
- The application that the secret is in. Use-a
for its shorthand.--format
(string: "")
- The output format you would like (json). Use-f
for its shorthand.--plaintext
- Displays the secret's value in plain text.