Skip to content

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"
| Command/Parameter | Purpose | | --- | --- | | 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:

pwsh -c "Save-Module -Name Az.Accounts -Path ./Modules"

The Modules folder is added to $env:PSModulePath for autoloading.

Verification

az functionapp config appsettings list \
  --name $APP_NAME \
  --resource-group $RG \
  --output table
| 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.

Next: 04 - Logging & Monitoring

See Also

Sources