Azure Functions are introducing a new hosting plan called Flex Consumption. It has significant changes in features from the current Consumption plan. This also means changes to the control plane CRUD schema of microsoft.web/sites and also for the deploy/publish endpoint.
This entry is to track adding AZD support for this hosting plan.
For the CRUD schema, this will be updated as part of the Microsoft.Web RP version 2023-12-01 as part of this PR.
For deployment, we have consolidated the deployment action into one approach where a blob storage container is configured through the control plane, and a zip file can be provided via:
- Check if the app is of the Flex Consumption SKU. For example, Azure Functions Core Tools does this with just the Azure subscription ID and the function app name :
-
Getting the function app resource id via
POST https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2022-10-01
{
"subscriptions": ["AZURE SUBSCRIPTION ID"],
"query": "where type =~ 'Microsoft.Web/sites' and name =~ 'FUNCTION APP NAME' | project id"
}
-
Get the details about the app:
GET https://management.azure.com/subscriptions/FUNCTION APP RESOURCE ID?api-version=2023-12-01
-
Look at properties.sku. This should say FlexConsumption for Flex Consumption function apps.
- If it is a Flex Consumption app, the publish URI with the zip file should be scm_url + /api/publish
- If you are polling for the latest deployment status every 2 seconds or more, you might end up seeing 404s since kudu finishes deployment quickly and then gets recycled. So, in that case, you would need to change the polling frequency to be every second.
- For Python, add a RemoteBuild=true to the query strings. Example code from AZ CLI
Azure Functions are introducing a new hosting plan called Flex Consumption. It has significant changes in features from the current Consumption plan. This also means changes to the control plane CRUD schema of microsoft.web/sites and also for the deploy/publish endpoint.
This entry is to track adding AZD support for this hosting plan.
For the CRUD schema, this will be updated as part of the Microsoft.Web RP version 2023-12-01 as part of this PR.
For deployment, we have consolidated the deployment action into one approach where a blob storage container is configured through the control plane, and a zip file can be provided via:
Getting the function app resource id via
POST https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2022-10-01
{
"subscriptions": ["AZURE SUBSCRIPTION ID"],
"query": "where type =~ 'Microsoft.Web/sites' and name =~ 'FUNCTION APP NAME' | project id"
}
Get the details about the app:
GET https://management.azure.com/subscriptions/FUNCTION APP RESOURCE ID?api-version=2023-12-01
Look at properties.sku. This should say FlexConsumption for Flex Consumption function apps.