4

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?

3 Answers 3

3

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.

enter image description here

To configure deployment settings when you create your function app in the Flex Consumption plan, refer MSDOC:

  • Azure CLI
  • Visual Studio Code
  • Azure Portal=>Settings=>Deployment Settings

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

2

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

2 Comments

it finally works with the AzureFunctionApp@2 build task
I'm still not able to deploy to a flex consumption app even with AzureFunctionApp@2 and the IsFlexConsumption set to true. I get the following error: Failed to deploy web package to App Service. Not Found (CODE: 404) Does the flex consumption app need to be configured in a certain way to allow deployments? The 404 is not that the pipeline can't fine my app, logs above this line state that the app is detected and it can correctly write any app settings I've listed. It seems to be the zip file upload that's failing which suggests to me it can't upload to the storage account?
0

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:

  1. Set the following attributes in the AzureFunctionApp@2 task: appType to functionAppLinux and isFlexConsumption to true
  2. Manually create the storage account blob container the function app was looking to deploy to based on the functionAppConfig.deployment.storage.value attribute defined within the function app bicep template.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.