New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recommended way to manage separate host configs #4575
Comments
@APIWT - can I ask about your scenario? We have separate App Settings (through the portal or through local.settings.json), but I'm wondering what differences you have in host.json. Thanks! |
@mhoeger sure! One good example is that we have a different log level in our environments. So on dev we log everything in app insights but in QA and production we only log errors. My opinion is that every configuration option in host.json could be set differently in different environments. |
Assuming this is in Functions 2.0, every For example, if you're changing a configuration named |
How do you represent arrays? For example: https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functions And how about bools? For example isEnabled for https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#applicationinsights Last but not least, are there any unsupported host.json options as environment variables? |
Also, how do we handle when we need dots in a key? For example here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#logging The key |
This is all based on the ASP.NET Core environment variable provider. Arrays are expressed as a 0 based configuration set of elements: For example:
You should be able to express booleans as simple "true"/"false" There are no options we block using environment variables. For periods, you can just set the variables with them. |
@fabiocav |
They can be either. Both are supported, but on Linux/Mac OS, colons are not supported in the environment variable name |
What is the recommended way to have a separate host.json file per CI environment/deployment?
The text was updated successfully, but these errors were encountered: