From 6f18344c56a6ebe43c5084af2002eec331dd80cf Mon Sep 17 00:00:00 2001 From: Anchal Sharma Date: Wed, 30 Oct 2024 15:24:04 +0530 Subject: [PATCH] Add a warning about environment variables casing for static configuration --- .../reference/static-configuration/env.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/content/reference/static-configuration/env.md b/docs/content/reference/static-configuration/env.md index e894850b2..d1758fa18 100644 --- a/docs/content/reference/static-configuration/env.md +++ b/docs/content/reference/static-configuration/env.md @@ -5,4 +5,23 @@ description: "Reference the environment variables for static configuration in Tr # Static Configuration: Environment variables +!!! warning "Environment Variable Casing" + + Traefik normalizes the environment variable key-value pairs by lowercasing them. + This means that when you interpolate a string in an environment variable's name, + that string will be treated as lowercase, regardless of its original casing. + + For example, assuming you have set environment variables as follows: + + ```bash + export TRAEFIK_ENTRYPOINTS_WEB=true + export TRAEFIK_ENTRYPOINTS_WEB_ADDRESS=:80 + + export TRAEFIK_CERTIFICATESRESOLVERS_myResolver=true + export TRAEFIK_CERTIFICATESRESOLVERS_myResolver_ACME_CASERVER=.... + ``` + + Although the Entrypoint is named `WEB` and the Certificate Resolver is named `myResolver`, + they have to be referenced respectively as `web`, and `myresolver` in the configuration. + --8<-- "content/reference/static-configuration/env-ref.md"