Complete the code to set an environment variable in an Azure App Service.
az webapp config appsettings set --name myApp --resource-group myResourceGroup --settings [1]=productionThe APP_ENV variable is commonly used to specify the environment type like production or development.
Complete the code to retrieve an environment variable in an Azure Function app using Python.
import os connection_string = os.getenv('[1]')
AzureWebJobsStorage is the environment variable that stores the connection string for Azure Functions storage account.
Fix the error in the Azure CLI command to list environment variables for a web app.
az webapp config appsettings [1] --name myApp --resource-group myResourceGroupThe correct Azure CLI command to list app settings is az webapp config appsettings list.
Fill both blanks to set two environment variables in an Azure App Service.
az webapp config appsettings set --name myApp --resource-group myResourceGroup --settings [1]=true [2]=us-east
FEATURE_FLAG is a common name for toggling features, and REGION specifies the deployment region.
Fill all three blanks to create a Python dictionary from environment variables for configuration.
config = {
'env': os.getenv('[1]'),
'debug': os.getenv('[2]') == 'true',
'region': os.getenv('[3]')
}This dictionary reads APP_ENV for environment, DEBUG_MODE for debug flag, and REGION for location.