From 5d8e8df7bd220dcca045a681354d9b90abe93d22 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Thu, 7 Aug 2025 15:47:32 -0400 Subject: [PATCH] docs: clarify consumers of environment variables for CLI (#26459) In https://github.com/hashicorp/nomad/issues/15459 we've had a bit of back-and-forth as a result of applying Nomad environment variables where they typically should not be used. Clarify that the env vars are for the CLI and mostly not for the agent. Also move the `NOMAD_CLI_SHOW_HINTS` description into the correct section. --- website/content/commands/index.mdx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/content/commands/index.mdx b/website/content/commands/index.mdx index 94c200572..39da9db98 100644 --- a/website/content/commands/index.mdx +++ b/website/content/commands/index.mdx @@ -60,7 +60,9 @@ the [`tls` block in agent configuration] for details. ### Environment variables Nomad can use environment variables to configure command-line tool options. You -may override these environment variables with individual flags. +may override these environment variables with individual flags. Except where +noted, these variables influence the behavior of the Nomad CLI and should not be +set for Nomad agents. #### Connection environment variables @@ -89,10 +91,10 @@ may override these environment variables with individual flags. - `NOMAD_CLI_NO_COLOR` - Disables colored command output. -#### Mutual TLS (mTLS) environment variables - - `NOMAD_CLI_SHOW_HINTS` - Enables ui-hints in common CLI command output. +#### Mutual TLS (mTLS) environment variables + - `NOMAD_CLIENT_CERT` - Path to a PEM encoded client certificate for TLS authentication to the Nomad server. Must also specify `NOMAD_CLIENT_KEY`. @@ -114,6 +116,10 @@ may override these environment variables with individual flags. #### Nomad Enterprise license environment variables +These environment variables influence the Nomad Enterprise license +configuration. These values are only used for Nomad Enterprise agents, not the +Nomad CLI. + - `NOMAD_LICENSE_PATH` - An absolute path to a Nomad Enterprise license file, for example `/etc/nomad.d/license.hclic`.