From 1459fe9bfa29cb97976b674d4d01fedcdfecf6f3 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:05:01 -0400 Subject: [PATCH] chore: document env substitution Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com> --- configuration/overview.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configuration/overview.mdx b/configuration/overview.mdx index a1917f4..db96e93 100644 --- a/configuration/overview.mdx +++ b/configuration/overview.mdx @@ -40,6 +40,27 @@ The server will check in a few different locations for server configuration (in You can edit any of these properties to your liking, and on restart Flipt will pick up the new changes. +### Environment Substitution + +The configuration file also supports environment variable substitution as of `v1.45.0`. + +This allows you to use environment variables in your configuration file. For example, you can use the `FLIPT_CUSTOM_DB_URL` environment variable in the configuration file like this: + +```yaml +db: + url: ${FLIPT_CUSTOM_DB_URL} +``` + +This will replace `${FLIPT_CUSTOM_DB_URL}` with the value of the `FLIPT_CUSTOM_DB_URL` environment variable. The format for environment variable substitution is `${ENV_VAR}`. + + + This can be used to provide sensitive information to Flipt without storing it + in the configuration file. For example, you can use environment variables to + store the database URL, API keys, or other sensitive information without + having to conform to the pre-defined Flipt [environment variable + format](#environment-variables). + + ### Remote Configuration Flipt supports fetching configuration from a remote source. This is useful for managing configuration across multiple instances of Flipt. The remote configuration source can be a URL to a configuration file stored in one of the following object storage services: