Load Vault to Environment Variables
Launch a shell or run a command with the secrets loaded as Environment Variables in it.
General Usage:
slv vault --vault <PATH_TO_VAULT> run [flags]
Flags:
Flag | Arguments | Required | Default | Description |
---|---|---|---|---|
--command | String | False | $SHELL | The command to be run |
--prefix | String | False | None | Prefix to add to the ENVAR |
--vault | String | True | NA | Path to the SLV Vault file |
--help | None | NA | NA | Help text for slv vault run |
Usage:
slv vault --vault <PATH_TO_VAULT> run -c <COMMAND_TO_RUN>
Example:
$ slv vault --vault test.slv.yaml run -c bash --prefix SLV_ENV_VAR_
Running command [bash] with secrets loaded into environment variables from the vault test.slv.yaml...
Please note that the secret names are prefixed with SLV_ENV_VAR_
$ env | grep SLV_ENV_VAR
SLV_ENV_VAR_username=johndoe
SLV_ENV_VAR_password=super_secret_password
$ exit
exit
Command [bash] ended successfully