'az functionapp create' fails with '... AlwaysOn cannot be set ...'
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
When creating a function with the --plan arg and specifying an existing F1\FREE app service plan the command fails with ‘… AlwaysOn cannot be set for this site as the plan does not allow it…’. However it is possible to create a Function App through the Azure Portal on a F1\FREE plan.
Command Name
az functionapp create
Errors:
There was a conflict. AlwaysOn cannot be set for this site as the plan does not allow it. For more information on pricing and features, please see: https://aka.ms/appservicepricingdetails
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here…
az group create …
az appservice plan create… (F1\FREE)
az storage account create…
az functionapp create --name {} --resource-group {} --storage-account {} --functions-version {} --os-type {} --plan {} --runtime {} --runtime-version {} --subscription {}
Expected Behavior
The same functionality as the Azure Portal should be allowed.
Environment Summary
Windows-10-10.0.18362-SP0
Python 3.6.6
azure-cli 2.1.0
Extensions:
application-insights 0.1.3
interactive 0.4.3
storage-preview 0.2.10
Additional Context
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Creating Azure function app against existing consumption plan
There was a conflict. AlwaysOn cannot be set for this site as the plan does not allow it. Do I need to specify...
Read more >Cannot turn off the AlwaysOn feature on Azure App Service
Hello there. I am experiencing the same issue, I am using a Windows Service Plan P1V2 and I want to scale back to...
Read more >Azure Powershell Functions: Getting Started - Fresh/Brewed
For a list of supported --runtime-versions, run "az functionapp create -h" Application Insights "psfntest1" was created for this Function ...
Read more >azure.appservice.FunctionApp - Pulumi
The name of the resource group in which to create the Function App. Changing this forces a new resource to be created. storageAccountAccessKey...
Read more >Digging into Azure Functions: It's Time to Take Them Seriously
If you need to run discrete and small units of code in a flexible, ... Once the Function App is created, clicking the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also when you mention “Consumption plans should not be shared between function apps” - do you mean that there can be only one function app per consumption plan? But I can see many functions app getting created under one consumption app service plan (please refer my attachments)?
Also, I do not understand how this consumption app service plan gets picked up by Azure? Please help me understand?
Thank you

Thanks you @anthonychu. When I run with --consumption-plan-location eastus it works. I see its gets linked to a specific App Service Plan which has already been created. How does azure pick which App Service Plan to get associated? Is there an way we could configure or change or point to an existing app service plan using any azure cli commands?