-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Environment variable not accessing in the config.yml
We deployed application in the docker container which is attached to azure app setting. And app setting has the environment variables for SF token and other values.
My config.yml in the docker image contains the dummy test values
Steps to Reproduce
Use config.yml with the test vallues for SF_Token,username,password for all required parameters and deploy the application in the docker container image.
The process is reading the values as its specified in the yaml instead of getting those values from application environment configuration.
I have tried couple of other way in yml to read environment variable values with below syntax in config.yml
Example:
token_url: ${SF_TOKEN_URL}
auth:
grant_type: password
client_id: "${SF_CLIENT_ID}"
client_secret: "${SF_CLIENT_SECRET}"
username: "#{SF_USERNAME}"
password: "#{SF_PASSWORD}"
Expected Behavior
How does your python code transform the values in the yaml if I use in the above format. or any document that we can refer how to use variable in yaml which can read the values from environment configuration from application when its deployed to .
https://github.com/newrelic/newrelic-salesforce-exporter/blob/main/src/__main__.py from this code the python is not reading values from environment.
I also tried to not using any arguments with out any values and consider to be reading default from environment variables but its not working either way.
Please suggest how do we use config.yml for the required arguments to read from appsetting environment variale.
JFYI we are not running command line argument like below this below command works when I run with parameter
-v d:/config.yml:/usr/src/app/config.yml -e NEW_RELIC_APP_NA
Relevant Logs / Console output
please suggest
Your Environment
OS is linux (docker container)
Application : Azure app service deployed to docker container ( docker image has the image of newreliexporter)