If you are lazy like me to read the documentation in detail you would probably not know how to add application settings (local settings) to Azure function App. And you’ll probably realize that once you deployed 🙂
Azure Functions are interesting when it comes to saving and consuming settings. Current suggested method may seem like a workaround however it is the reality. I mean how hard it could be to automatically save and sync Application Settings when you deployed your App?? Shouldn’t be so hard right?
I really would not like to discuss this but to show you the workaround to copy the settings entries in your local.settings.json into the Azure Deployment in cloud.
After you’ve created the Publish Profile and published your App to the service, go to the Hosting Section in Publish Profile Page and click the three dots on right to open the context menu and click “Manage Azure App Service Settings”
When you do that, a new windows opens (with a short delay) and shows you the settings in your target environment. Click on “Insert value from Local” to copy the Setting value of your local.settings.json to Azure App Service Settings.
After clicking OK, Visual Studio will save the settings on remote service. (You dont have to re-publish your function.) To verify the operation, visit your app in Azure Portal and navigate to Configuration under Settings tab. There you should see the newly added configurations.
By the way, this whole thing could be achieved by a command line command if you are using Visual Studio Code.
func azure functionapp publish *YourAppName* --publish-local-settings -i