How to add configuration values in AppSettings.json in Azure functions. Is there any structure for it?

后端 未结 7 1986
别那么骄傲
别那么骄傲 2021-02-12 18:51

What is the standard structure to add keys to appsettings.json? Also, how to read those values in our run.csx? Normally in app.config, we had Con

7条回答
  •  南笙
    南笙 (楼主)
    2021-02-12 19:36

    Appsettings are not managed by the function itself, but by its Function App. So, if you use the cli, is something along...

    az functionapp appsettings set .....

    That's how I do it in my CI/CD pipeline. After that, you can use them in your functions. Remember that a function MUST live within a Function App, so it makes total sense to place all those values there so that you have them available in every function.

提交回复
热议问题