Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions website/content/en/docs/reference/environment_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ You can escape environment variables by prefacing them with a `$` character. For
example `$${HOSTNAME}` or `$$HOSTNAME` is treated literally in the above
environment variable example.

## Variable name restrictions

Environment variable names used in interpolation are restricted to letters, digits plus `_` and `.` characters.
Names containing other characters (such as hyphens `-`) will not be interpolated.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify that hyphens can still trigger interpolation

For hyphenated placeholders this says they “will not be interpolated,” but the interpolation regex in src/config/vars.rs still matches the valid prefix for $FOO-BAR and treats ${FOO-BAR} as the documented - default-value form. In configs that contain Kubernetes-style names or other hyphenated placeholders, users following this reference may expect the text to remain literal when Vector can instead substitute $FOO, emit a missing-var error, or resolve ${FOO-BAR} to BAR; the docs should say unsupported characters terminate the variable name / enter operator syntax and advise escaping or preprocessing.

Useful? React with 👍 / 👎.


## Security Restrictions

Vector prevents security issues related to environment variable interpolation by rejecting environment variables that contain newline
Expand Down
Loading