Generate a Vault Agent development configuration file
Use the Vault CLI to create a basic development configuration file to run Vault Agent in process supervisor mode.
Development configuration files include an auto_auth
section that reference a
token file based on the Vault token used to authenticate the CLI command. Token
files are convenient for local testing but are not appropriate for in
production. Always use a robust
auto-authentication method in
production.
Assumptions
- You have set up a
kv
v2 plugin. - Your authentication token has
read
permissions for thekv
v2 plugin.
Use vault agent generate-config
to create a development configuration file with environment variable templates:
For example:
The configuration file includes env_template
entries for each key stored at
the explicit paths and any key encountered while recursing through paths ending
with /*
. Template keys have the form <final_path_segment>_<key_name>
.
For example: