Skip to content

environment variables #1174

Answered by mihaitodor
rdilipk asked this question in Q&A
Mar 14, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I think GitHub must've skipped some notification emails... If we're slow to reply here, please reach out via the other means.

Regarding your question, please look at https://www.benthos.dev/docs/configuration/interpolation/. If you configure dsn: ${FOO}, then Benthos will attempt to set the dsn to the contents of the FOO environment variable. You can even specify a default value like so: dsn: ${FOO:foouser:foopassword@tcp(localhost:3306)/foodb} if you don't want to get an empty string when FOO isn't set.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rdilipk
Comment options

Answer selected by rdilipk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants