Environment variables for decK

Uses: deck
Related Documentation
Related Resources

decK can read environment variables at runtime, allowing you to pass per-environment configuration.

To allow decK to read environment variables, reference them as ${{ env "DECK_*" }} in your state file.

The following example configures a Vault token using a decK environment variable:

_format_version: "3.0"
vaults:
- name: hcv
  description: My custom HashiCorp Vault
  prefix: my-hcv
  config:
    host: "localhost"
    kv: "v2"
    mount: "secret"
    port: 8200
    protocol: "https"
    token: ${{ env "DECK_HCV_TOKEN" }}

To test, set the DECK_HCV_TOKEN environment variable and run deck gateway sync:

export DECK_HCV_TOKEN='YOUR_TOKEN_HERE'
deck gateway sync kong.yaml

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!