I have created a function app against a new consumption plan with the following command:
az functionapp create
--resource-group myresourcegroup
--storage-account mystorageaccount
--name myfunctionapp
--runtime node
--consumption-plan-location northeurope
This creates the function app correctly, but the app service plan is called NorthEuropePlan
, which does not meet the naming guidelines I am following. I cannot see anything in the docs that will allow me to change this name.
Therefore, I would like to create the app service plan before, as a consumption plan (tier Y1 Dynamic
), and then create a function app against this plan.
az resource create
--resource-group myresourcegroup
--name myconsumptionplan
--resource-type Microsoft.web/serverfarms
--is-full-object
--properties "{\"location\":\"northeurope\",\"sku\":{\"name\":\"Y1\",\"tier\":\"Dynamic\"}}"
That command works correctly, and creates me an app service plan. However, when I try to use that plan (substituting --consumption-plan-location northeurope
for --plan myconsumptionplan
), I get this error:
There was a conflict. AlwaysOn cannot be set for this site as the plan does not allow it.
Do I need to specify some more configuration when I make the app service plan?
When I run az appservice plan show
against NorthEuropePlan
and myconsumptionplan
, the only difference in the object that comes back is the name.