Bicep - Flex Consumption Plan not available in this region (but it is in Portal)

Endre Gjølstad 0 Reputation points
2025-08-07T08:46:07.2866667+00:00

Hi, I'm trying to deploy my bicepscript but I am getting this error:

{
	"status": "Failed",
	"error": {
		"code": "DeploymentFailed",
		"target": "/subscriptions/<guid>/resourceGroups/<customer>-kmr-uat/providers/Microsoft.Resources/deployments/uatDeploy060825",
		"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
		"details": [
			{
				"code": "ResourceDeploymentFailure",
				"target": "/subscriptions/<guid>/resourceGroups/<customer>-kmr-uat/providers/Microsoft.Resources/deployments/<customer>-uat-scheduler-func",
				"message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.",
				"details": [
					{
						"code": "DeploymentFailed",
						"target": "/subscriptions/<guid>/resourceGroups/<customer>-kmr-uat/providers/Microsoft.Resources/deployments/<customer>-uat-scheduler-func",
						"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
						"details": [
							{
								"code": "Unauthorized",
								"target": "/subscriptions/<guid>/resourceGroups/<customer>-kmr-uat/providers/Microsoft.Web/serverfarms/<customer>-uat-scheduler-func-plan",
								"message": "{\r\n  \"Code\": \"Unauthorized\",\r\n  \"Message\": \"Requested features are not supported in region. Please try another region.\",\r\n  \"Target\": null,\r\n  \"Details\": [\r\n    {\r\n      \"Message\": \"Requested features are not supported in region. Please try another region.\"\r\n    },\r\n    {\r\n      \"Code\": \"Unauthorized\"\r\n    },\r\n    {\r\n      \"ErrorEntity\": {\r\n        \"ExtendedCode\": \"59911\",\r\n        \"MessageTemplate\": \"Requested features are not supported in region. Please try another region.\",\r\n        \"Parameters\": [],\r\n        \"Code\": \"Unauthorized\",\r\n        \"Message\": \"Requested features are not supported in region. Please try another region.\"\r\n      }\r\n    }\r\n  ],\r\n  \"Innererror\": null\r\n}"
							}
						]
					}
				]
			}
		]
	}
}

In the dev resource group I have manually added a function app using the portal gui and compared the plan parameters.

My plan in bicep looks like this: (Also tried with all properties set the same as the one in the dev resource group)

resource functionAppPlan 'Microsoft.Web/serverfarms@2024-11-01' = {
  name: '${name}-plan'
  location: 'Norway East'
  sku: {
    name: 'FC1'
    tier: 'FlexConsumption'
    size: 'FC1'
    family: 'FC'
    capacity: 0
  }
  kind: 'functionapp'
}

I'm running Azure CLI 2.76.0
output from: az functionapp list-flexconsumption-locations --output table

Name
------------------
canadacentral
northeurope
westeurope
southeastasia
eastasia
westus
japanwest
japaneast
eastus2
northcentralus
southcentralus
brazilsouth
australiaeast
australiasoutheast
centralus
eastus
centralindia
southindia
westcentralus
westus2
ukwest
uksouth
eastus2euap
koreacentral
francecentral
southafricanorth
switzerlandnorth
germanywestcentral
uaenorth
norwayeast   <-------
westus3
swedencentral
italynorth
spaincentral

Why can't I use bicep to create this Flex Consumption Plan for my function?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

1 answer

Sort by: Most helpful
  1. Rakesh Mishra 165 Reputation points Microsoft External Staff Moderator
    2025-08-08T17:40:34.2366667+00:00

    Hi @Endre Gjølstad ,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    Please add properties field in bicep file and mark reserved to true. For Flex Consumption App Service Plans you must explicitly mark the plan as “reserved” (i.e. Linux-based) – otherwise ARM will reject the SKU in certain regions, even if the portal lets you create it.

    resource functionAppPlan 'Microsoft.Web/serverfarms@2024-11-01' = {
      name: '${name}-plan'
      location: 'Norway East'
      sku: {
        name: 'FC1'
        tier: 'FlexConsumption'
        size: 'FC1'
        family: 'FC'
        capacity: 0
      }
      kind: 'functionapp'
      properties: {
        // This flag tells ARM to provision a Linux-based Flex Consumption plan
        reserved: true
      }
    }
    

    Reference: https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/blob/main/IaC/bicep/main.bicep#L158

    Please accept as Yes if the answer is helpful so that it can help others in the community.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.