03 - Configuration (Flex Consumption)¶
Manage app settings, connection strings, and PowerShell module dependencies for your Flex Consumption (FC1) app.
App Settings¶
az functionapp config appsettings set \
--name $APP_NAME \
--resource-group $RG \
--settings "GreetingPrefix=Hello" "FUNCTIONS_WORKER_RUNTIME_VERSION=7.4"
az functionapp config appsettings set | Add or update application settings on the function app. | | --name | Name of the function app. | | --resource-group | Resource group that contains the function app. | | --settings | Key=value application settings to apply. | Read settings in PowerShell with $env:GreetingPrefix.
Module Dependencies¶
Managed dependencies are not supported on Flex Consumption. Bundle modules into a Modules folder before publishing:
The Modules folder is added to $env:PSModulePath for autoloading.
Verification¶
| Command/Parameter | Purpose | | --- | --- | |az functionapp config appsettings list | List the application settings on the function app. | | --name | Name of the function app. | | --resource-group | Resource group that contains the function app. | | --output | Output format (table). | Confirm GreetingPrefix appears with the expected value.
Next Steps¶
With configuration in place, wire up observability.
See Also¶
- Tutorial Overview & Plan Chooser
- PowerShell Language Guide
- Platform: Hosting Plans
- Operations: Deployment
- Recipes Index