From fb7065c67efcd0167c08926a5c7d7389f59511af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Duarte?= Date: Wed, 13 Oct 2021 11:17:49 +0100 Subject: [PATCH] [DOC] Clarify the scope of environment variable expansion (#13299) Environment variable expansion only works in plugin parameters, not in conditionals. For more on this limitation see https://github.com/elastic/logstash/issues/5115 (cherry picked from commit 096eb7ac4822426091312b38969d88f371d33798) --- docs/static/configuration.asciidoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/static/configuration.asciidoc b/docs/static/configuration.asciidoc index 9dce5f5a61e..029e656f6ff 100644 --- a/docs/static/configuration.asciidoc +++ b/docs/static/configuration.asciidoc @@ -726,6 +726,10 @@ environment variable is undefined. * You can add environment variable references in any plugin option type : string, number, boolean, array, or hash. * Environment variables are immutable. If you update the environment variable, you'll have to restart Logstash to pick up the updated value. +NOTE: Environment variable references are only supported in plugin configuration, not in {logstash-ref}/event-dependent-configuration.html#conditionals[conditionals]. A workaround for this limitation is to add a new event field with the value +of the environment variable and use that new field in the conditional. + + ==== Examples The following examples show you how to use environment variables to set the values of some commonly used