Using the Azure Portal
- Navigate to your app service and find configuration under settings.
- Click + New application setting
- Enter the name of the setting (variable your app will call)
- Enter the value (in this example the name of the DB)
- After entering your value click OK
- Click the save icon at the top of the application settings page. This will also restart the app.
- Using Azure CLI
- The base command is: az webapp config appsettings
- When creating a new setting or updating an existing setting use set: az webapp config appsettings set --resource-group MyResourceGroup --name MyAppName --settings DATABASE_NAME=wp
- To get a list of current settings use list: az webapp config appsettings list --name MyAppName --resource-group MyResourceGroup
- To remove an app setting use delete: az webapp config appsettings delete --name MyAppName --resource-group MyResourceGroup --setting-names {space separated list of settings names}