0

I am trying to deploy an app service environment and exported the the template where it defines the multirole pools:

 {
      "type": "Microsoft.Web/hostingEnvironments/multiRolePools",
      "apiVersion": "2022-09-01",
      "name": "[concat(parameters('resourceName'), '/default')]",
      "location": "East US",
      "dependsOn": [
        "[resourceId('Microsoft.Web/hostingEnvironments', parameters('resourceName'))]"
      ],
      "sku": {
        "name": "Q1",
        "tier": "Quantum",
        "size": "Q1",
        "family": "Q",
        "capacity": 2
      },
      "properties": {
        "workerSize": "Standard_D1_V2",
        "workerCount": 2
      }
    }

I keep getting this error :

Message: Operation not supported for resource type Microsoft.Web/hostingEnvironments with kind version2
InnerError:
Code: BadRequest

I am trying to run the exported template and keep getting this error. No documentation on the above either.

vinzzz
  • 2,084
  • 2
  • 14
  • 23

1 Answers1

0

Error: Operation not supported for resource type Microsoft.Web/hostingEnvironments with kind version2:

After a workaround on the above, I found an approach as shown below.

According to the template from MSDoc, there is a property called "kind" : "string". Add this in the below format with the appropriate ASE value as per your requirement and deploy again.

"kind": ASEV2 or ASEV1

After the above modifications, I tried creating an app service with a hosting environment and was able to run it successfully as shown.

enter image description here

Output:

enter image description here

You can also refer this MSDoc for the relevant information.

If still the issue persists, check the resource type and name are matching each other. Because when the format of the resource name does not match the format of the resource type, this error may occur. Make sure the number of segments in the resource name corresponds to the number of segments in the resource type as detailed in this document.

Jahnavi
  • 3,076
  • 1
  • 3
  • 10