feat: add variable support

This commit is contained in:
2025-03-16 23:42:54 -05:00
parent cd5f7611a9
commit 5f40713e98
3 changed files with 47 additions and 5 deletions

View File

@@ -362,6 +362,7 @@ func getExternalConfigDirectiveValue(key string, opts *ConfigOpts) string {
if !(strings.HasPrefix(key, externDirectiveStart) && strings.HasSuffix(key, externDirectiveEnd)) {
return key
}
key = replaceVarInString(opts.Vars, key, opts.Logger)
opts.Logger.Debug().Str("expanding external key", key).Send()
if strings.HasPrefix(key, envExternDirectiveStart) {
key = strings.TrimPrefix(key, envExternDirectiveStart)