From 9003f8be9c144d02ecb8ca272b756483afa344de Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Thu, 12 Dec 2019 09:31:24 -0800 Subject: [PATCH] Document that env vars can't be used for config (#6912) * Document that env vars can't be used for config Environment variables are not read for config values when starting the Consul agent. Document this. --- website/source/docs/agent/options.html.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/website/source/docs/agent/options.html.md b/website/source/docs/agent/options.html.md index 7abf8c1482..ca13ad4f3f 100644 --- a/website/source/docs/agent/options.html.md +++ b/website/source/docs/agent/options.html.md @@ -16,8 +16,7 @@ descriptions. Configuration precedence is evaluated in the following order: 1. Command line arguments -2. Environment Variables -3. Configuration files +2. Configuration files When loading configuration, Consul loads the configuration from files and directories in lexical order. For example, configuration file @@ -41,6 +40,14 @@ configuration reload. You can test the following configuration options by following the [Getting Started](https://learn.hashicorp.com/consul/getting-started/install?utm_source=consul.io&utm_medium=docs) guides to install a local agent. +## Environment Variables +Environment variables **cannot** be used to configure the Consul client. They +*can* be used when running other `consul` CLI commands that connect with a +running agent, e.g. `CONSUL_HTTP_ADDR=192.168.0.1:8500 consul members`. + +See [Consul Commands](/docs/commands/index.html#environment-variables) for more +information. + ## Command-line Options The options below are all specified on the command-line.