Environment variables are not resolved when using templates #3054
Labels
enhancement
needs investigation
It looks as though have all the information needed but investigation is required
It seems that environment variables are not resolved the same way in templates as they are in regular configuration files. There is a workaround, so it's not a major issue, but I assume this could be a challenge for many newcomers, as it was for me.
Given this template:
Here's the error I encounter when using templates:
It's simple to replace
seed_brokers
withenv("KAFKA_BROKERS")
, if you know you need to, but this is a bit of a gotcha.Moreover, it seems you can't set defaults using environment variables. Both
default: "${SOME_VARIABLE}"
anddefault: ${! env("SOME_VARIABLE") }
appear to evaluate to null, resulting in the error:expected object value, got !!null
.The text was updated successfully, but these errors were encountered: