Using ENVIRONMENT variables in kong configuration file in DB less mode

I am setting up Kon in DB less mode with kon_config.yml file. Using the documentation : https://docs.konghq.com/2.2.x/db-less-and-declarative-config/

$ export KONG_DATABASE=off
$ export TARGET_address=10.32.1.1:5000
$ kong start -c kong.conf

I want to be able to use variable TARGET_address inside kong.conf file.

Does the declarative configuration format support using environment variables? It does not appear to be documented here: https://docs.konghq.com/2.2.x/db-less-and-declarative-config/#the-declarative-configuration-format

Hello,

Declarative configuration does not currently support variable substitution. There is a workaround noted in this doc that may help you.

Create the config template file, then use the envsubst command to replace environment variable.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ