Derive array type parameter from environment variable #15430
-
Hello, Say I have this config: [sources.my_source_id]
type = "kafka"
bootstrap_servers = "10.14.22.123:9092,10.14.23.332:9092"
group_id = "consumer-group-name"
key_field = "message_key"
topics = [ "foo", "bar", "baz" ] I would like the
But I wonder if it's possible to instead set an environment variable like this
then have vector do some sort of
but obviously, this doesn't work. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hey @pirxthepilot ! Yeah, as you observed using VRL functions in config isn't currently supported, but that is a neat idea. I'd recommend the regex. |
Beta Was this translation helpful? Give feedback.
-
I'm trying something similar, but I can't get the recommended regex to work. Can someone share some documentation on how using regexes with environment variables is supposed to work? Alternatively, perhaps a config snippet that shows the source config, how it refers to the environment variable and then the actual value of the environment variable? |
Beta Was this translation helpful? Give feedback.
Hey @pirxthepilot !
Yeah, as you observed using VRL functions in config isn't currently supported, but that is a neat idea. I'd recommend the regex.