Configuration substitutions - tyk.conf API.json

We’re using github for managing tyk configuration and we don’t want to commit the secrets. It would be ideal if the Tyk configs supported environment variable substitution to inject secrets from the environment variables.

${TYK_SECRET}
${REDIS_USERNAME}
$REDIS_PASSWORD}
${FOO_API_JWT_SECRET}
${BAR_API_JWT_SECRET}
etc.

We’re running in Kubernetes, so all the back-office service names and ports don’t need to change. We just need to manage those secrets in a more concise way. Ideally we just want to initialize the secrets as environment variables or mount them in a file and have Tyk substitute them.

I’m guessing Tyk doesn’t currently support this. If not we’ll have to write a script that performs the substitution before starting Tyk.

1 Like

You’re in luck, v2.3 - releasing very soon - is fully configurable with environment variables :slight_smile:

2 Likes