docs(config): Add comment about single vs double quotes (#14621)

This commit is contained in:
Joshua Powers 2024-01-24 13:11:10 -07:00 committed by GitHub
parent eda5378829
commit f58472d66f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,12 @@ them with `${}`. Replacement occurs before file parsing. For strings
the variable must be within quotes, e.g., `"${STR_VAR}"`, for numbers and booleans
they should be unquoted, e.g., `${INT_VAR}`, `${BOOL_VAR}`.
Users need to keep in mind that when using double quotes the user needs to
escape any backslashes (e.g. `"C:\\Program Files"`) or other special characters.
If using an environment variable with a single backslash, then enclose the
variable in single quotes which signifies a string literal (e.g.
`'C:\Program Files'`).
In addition to this, Telegraf also supports Shell parameter expansion for environment variables
which allows syntax such as: