-
Notifications
You must be signed in to change notification settings - Fork 201
Creating Function Apps in an existing Resource Group
In some cases, when trying to create a Function App, you may receive the following error:
The pricing tier is not allowed in this resource group
This can happen in the following situation:
- you're creating the Function App in an existing resource group
- this resource group already contains regular (i.e. non-Dynamic or Premium) Web Apps in the same region that you're trying to create the Function App. This can even occur if you are creating a Azure Functions Premium Plan in a resource group that has an App Service Premium Plan of the same OS.
- the scale unit that those non-Dynamic or Premium resources are in does not yet support this SKU
- you are attempting to create a Linux Consumption app in a resource group with any other app service plan type.
In short the reason this happens is behind the scenes we have different pools of resources. Different SKUs require a different set of machines. For example, the Azure Functions Premium Plan requires modern and larger machines, whereas the consumption / dynamic plans do not. When you create an app in a resource group, that resource group is mapped and assigned to a specific pool of resources. If you try to create another plan in that resource group and the mapped pool (called ‘stamp’ internally) does not have the required resources, this error will occur. The best course of action is to create the plan in a new resource group. If you need the option to move between something like Windows Consumption and Windows Functions Premium, you could also create the Functions Premium Plan first in a resource group (which would map the resource group to a pool that has premium VMs available) and then create the consumption plan (which can run in nearly all Windows pools).
Even in some situations we have pools specifically for one plan. For example, Linux consumption stamps can only run linux consumption apps, so you aren't able to place a linux consumption plan in the same resource group as any other app service plan. The functions themselves can be in the same resource group, but the plan cannot be.
We are tracking work to allow these situations to happen much less often, but may still occur from time to time.