Is it possible to access environmental variables within conf files?
This is related to a much broader question on how to handle conf files within a git repo and inject sensitive secrets into the config files, such as runtime environmental variables.
I have tried the ${ENV(AST_PASSWORD)} but no success. Is it config specific? I.e. some conf files will allow ${ENV()} where others won’t?
Generally variable substitution is only done on dialplans, although there might be the odd exception that I’m not aware of. That means extensions.conf and extensions.ael,etc. They are done at run time, not at configuration load time
Thank you, appreciate the quick response. I suspected this would be the case.
What is the best practice for handling secrets in config files between repo and production? EnvVars would have been the easiest route but that doesn’t appear to be an option, there are alternatives, e.g. using sed to read/replace EnvVars and injecting it into the config at build stage - workable but a bit of a pain.