Skip to content

03 - Configuration (Consumption)

Manage app settings, connection strings, and PowerShell module dependencies for your Consumption (Y1) 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

Use managed dependencies. Declare modules in requirements.psd1 and enable managedDependency in host.json:

@{
    'Az.Accounts' = '2.*'
}

The runtime downloads them from the PowerShell Gallery on startup.

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

Legacy hosting path

Consumption plan (Y1) content is provided for existing workloads. For most new serverless applications, prefer Flex Consumption.