[DOC] Clarify the scope of environment variable expansion (#13299) (#13311)

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 096eb7ac48)
This commit is contained in:
João Duarte 2021-10-13 14:23:27 +01:00 committed by GitHub
parent 6983129f47
commit a46efe4df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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