Reputation: 1309
Azure Function Apps on "Consumption" and "Function Premium" hosting plan do have the option for continuous deployment and linking a Github repository.
I read that it's best practices to secure resources in one virtual network and, as "Consumption" hosting plan doesn't have the capability of using a vnet, I was looking out for the "Flex Consumption" Plan, which has this capability.
Unfortunately it doesn't show the continuous deployment settings under "Deployment". It only shows the configuration for basic authentication. Also when the resource is setup, continuous deployment doesn't show.
EDIT: Workaround for now is manually whitelisting datacenter of same region as described here Allow list IPs for Azure Function App on consumption tier
I'm wondering if this is a issue or if its by definition like this?
Upvotes: 4
Views: 2080
Reputation: 5
Building on the answer from @mr3k I was able to us the AzureFunctionApp@2 task to deploy out my flex consumption function app but initially got the Failed to deploy web package to App Service. Not Found (CODE: 404)
error @Crwydryn had mentioned. To resolve this I needed to make two changes:
See https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/blob/main/IaC/bicep/main.bicep for an example of how to setup the storage account blob container for the deployment
Upvotes: 0
Reputation: 366
Even though documentation still is saying that "Continuous deployment using Azure DevOps Tasks (AzureFunctionApp@2)" is not yet supported, the task actually was updated to support this.
Documentation on AzureFunctionApp@2: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-function-app-v2?view=azure-pipelines
Upvotes: 2
Reputation: 8694
The Flex Consumption plan is currently in preview and as of now, there are few limitations when using this plan for function apps.
Deployments:
As mentioned in official MSDOC, deployment-related features such as Deployment slots, Continuous deployment using Azure DevOps Tasks (AzureFunctionApp@2
), Continuous deployment using GitHub Actions (functions-action@v1
) are not currently supported.
To configure deployment settings when you create your function app in the Flex Consumption plan, refer MSDOC:
Upvotes: 3