Subchapter 28.28
references/services/functions/consumption-to-flex.mdMarkdown11 KBView on GitHub
Source: Azure Functions Consumption Plan (Y1/Dynamic) on Linux Target: Azure Functions Flex Consumption Plan (FC1/FlexConsumption) : Linux only (Windows support planned for future) :
az functionapp flex-migration list and az functionapp flex-migration startflex-migration commands handle assessment, app creation, and most configuration migration automaticallysquashfs format stored in scm-releases blob containerresource-graph extension: az extension add --name resource-graphjq tool for JSON processing| Stack ID | Language | Supported? |
|---|---|---|
dotnet-isolated | .NET (isolated worker model) | ✅ Yes |
node | JavaScript/TypeScript | ✅ Yes |
java | Java | ✅ Yes |
python | Python | ✅ Yes |
powershell | PowerShell | ✅ Yes |
dotnet | .NET (in-process model) | ❌ No — must migrate to isolated first |
custom | Custom handlers | ✅ Yes |
| Feature | Status | Impact |
|---|---|---|
| Deployment slots | ❌ Not supported | Rearchitect to use separate apps |
| TLS/SSL certificates | ❌ Not supported | Wait for support or find alternative |
| Blob trigger (polling) | ❌ Only EventGrid source | Convert LogsAndContainerScan → EventGrid |
| Azure Government | ❌ Not available | Cannot migrate yet |
Run all checks from assessment.md. Use the automated eligibility check:
# Automated eligibility check — scans all Linux Consumption apps
az functionapp flex-migration listThis returns eligible_apps and ineligible_apps arrays with specific reasons for any incompatibilities. For detailed manual checks, see automation.md.
Collect all settings and configurations from the existing app before creating the new one. See Step-by-step scripts in automation.md:
Run the automated migration command from automation.md — Step 4.
The flex-migration start command automatically:
💡 Use Microsoft Entra ID + managed identities instead of connection strings when creating the new app.
Enterprise subscriptions commonly enforce policies blocking local auth. Configure identity-based access:
AzureWebJobsStorage__credential, __clientId, and service-specific URIs (__blobServiceUri, __queueServiceUri, __tableServiceUri)APPLICATIONINSIGHTS_AUTHENTICATION_STRING with Authorization=AADmanagedIdentityClientId explicitlyThe flex-migration start command handles most configuration. Verify the results and manually configure anything it doesn’t cover (see automation.md):
⚠️ Code is NOT automatically migrated. The new app is created with config only — you must deploy code separately.
Use ask_user to present these options:
Your new Flex Consumption app
<NEW_APP_NAME>has been created and configured. Now we need to deploy your function code. How would you like to proceed?
- Update CI/CD pipeline — I’ll help you update your Azure Pipelines or GitHub Actions workflow to target the new app
- Deploy from local project — I’ll run
func azure functionapp publish <NEW_APP_NAME>from your project directory- Deploy existing package — I’ll deploy the package we downloaded earlier from the original app
After user selects an option, execute the corresponding deployment method from automation.md — Step 5.
⚠️ After deployment, triggers immediately start processing. Review mitigation strategies for your trigger types.
After successful deployment, inform the user:
Code deployed! Next steps to consider:
- The original app is still running — keep it as rollback for a few days
- Update any clients/pipelines to point to the new URL
- Enable HTTPS-only and managed identity on the new app for better security
- When confident, you can delete the original app
az functionapp show --query defaultHostName -o tsv, then hit that URL and confirm it returns a non-error response (HTTP 2xx/4xx, not connection refused or 503). This is the minimum bar before proceeding.az functionapp show --query sku)curl https://<DEFAULT_HOST>/api/<FUNCTION_NAME>)| Trigger Type | Risk | Mitigation |
|---|---|---|
| Azure Blob storage | High | Create separate container for event-based trigger in new app |
| Azure Cosmos DB | High | Create dedicated lease container for new app; set StartFromBeginning: false |
| Azure Event Grid | Medium | Recreate event subscriptions; ensure idempotent functions |
| Azure Event Hubs | Medium | Create new consumer group for new app |
| Azure Service Bus | High | Create new topic/queue; update senders; drain original before shutdown |
| Azure Storage Queue | High | Create new queue; update senders; drain original before shutdown |
| HTTP | Low | Update clients to target new app URL |
| Timer | Low | Offset schedules during cutover to avoid simultaneous execution |
| Property | Consumption | Flex Consumption |
|---|---|---|
| SKU | Y1 (Dynamic) | FC1 (FlexConsumption) |
| Plan required | Optional (auto-created) | Required (must be explicit) |
| OS | Linux | Linux only |
| Configuration | App settings | functionAppConfig section |
| Storage | WEBSITE_CONTENTSHARE setting | deployment.storage in functionAppConfig |
These app settings are NOT supported in Flex Consumption and should be filtered out:
WEBSITE_USE_PLACEHOLDER_DOTNETISOLATEDAzureWebJobsStorage* (replaced by identity-based config)WEBSITE_MOUNT_ENABLEDENABLE_ORYX_BUILDFUNCTIONS_EXTENSION_VERSION (set via functionAppConfig)FUNCTIONS_WORKER_RUNTIME (set via functionAppConfig)FUNCTIONS_WORKER_RUNTIME_VERSIONFUNCTIONS_MAX_HTTP_CONCURRENCYFUNCTIONS_WORKER_PROCESS_COUNTFUNCTIONS_WORKER_DYNAMIC_CONCURRENCY_ENABLEDSCM_DO_BUILD_DURING_DEPLOYMENTWEBSITE_CONTENTAZUREFILECONNECTIONSTRINGWEBSITE_CONTENTOVERVNETWEBSITE_CONTENTSHAREWEBSITE_DNS_SERVERWEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUTWEBSITE_NODE_DEFAULT_VERSIONWEBSITE_RUN_FROM_PACKAGEWEBSITE_SKIP_CONTENTSHARE_VALIDATIONWEBSITE_VNET_ROUTE_ALLAPPLICATIONINSIGHTS_CONNECTION_STRING (already created in new app)| Issue | Remediation |
|---|---|
| Cold start performance issues | Review concurrency settings; check for missing dependencies |
| Missing bindings | Verify extension bundles; update binding configurations |
| Permission errors | Check identity assignments and role permissions |
| Network connectivity | Validate access restrictions and networking settings |
| Missing App Insights | Recreate the Application Insights connection |
| App fails to start | Check portal Diagnose & Solve; review App Insights Failures blade |
| Triggers not processing | Verify binding configs, connection strings, consumer groups |
az functionapp start --name <ORIGINAL_APP_NAME> --resource-group <RESOURCE_GROUP>