6

I am learning Azure and as learning exercise I need to create a WordPress website.

I use this Microsoft learning documentation.

I activated the sandbox, but when it comes to create a website resource, I obtain an error:

enter image description here

Resource 'ServicePlan4b9381a9-93ea' was disallowed by policy.

{
   "telemetryId":"aea923d1-dbad-418d-aa94-0721bcdddc7d",
   "bladeInstanceId":"Blade_36ae47db3af644939b1c1ed987ec8373_0_0",
   "galleryItemId":"WordPress.WordPress",
   "createBlade":"CreateBlade",
   "code":"InvalidTemplateDeployment",
   "message":"The template deployment failed because of policy violation. Please see details for more information.",
   "details":[
      {
         "code":"RequestDisallowedByPolicy",
         "target":"ServicePlan4b9381a9-93ea",
         "message":"Resource 'ServicePlan4b9381a9-93ea' was disallowed by policy. (Code: RequestDisallowedByPolicy)",
         "additionalInfo":[
            {
               "type":"PolicyViolation",
               "info":{
                  "policyDefinitionDisplayName":"AppService-SKU",
                  "evaluationDetails":{
                     "evaluatedExpressions":[
                        {
                           "result":"True",
                           "expression":"type",
                           "path":"type",
                           "expressionValue":"Microsoft.Web/serverfarms",
                           "targetValue":"Microsoft.Web/serverFarms",
                           "operator":"Equals"
                        },
                        {
                           "result":"False",
                           "expression":"Microsoft.Web/serverfarms/sku.name",
                           "path":"sku.name",
                           "expressionValue":"S1",
                           "targetValue":[
                              "F1",
                              "D1"
                           ],
                           "operator":"In"
                        }
                     ]
                  },
                  "policyDefinitionId":"/providers/Microsoft.Management/managementGroups/604c1504-c6a3-4080-81aa-b33091104187/providers/Microsoft.Authorization/policyDefinitions/e790fdfe-5672-403f-9a29-e1aa564ac680",
                  "policyDefinitionName":"e790fdfe-5672-403f-9a29-e1aa564ac680",
                  "policyDefinitionEffect":"Deny",
                  "policyAssignmentId":"/providers/Microsoft.Management/managementGroups/triplecrown2/providers/Microsoft.Authorization/policyAssignments/7bb64c0aa90247de8b4491c3",
                  "policyAssignmentName":"7bb64c0aa90247de8b4491c3",
                  "policyAssignmentDisplayName":"AppService-SKU",
                  "policyAssignmentScope":"/providers/Microsoft.Management/managementGroups/triplecrown2",
                  "policyAssignmentParameters":{
                     
                  }
               }
            }
         ],
         "policyDetails":[
            {
               "isInitiative":false,
               "assignmentId":"/providers/Microsoft.Management/managementGroups/triplecrown2/providers/Microsoft.Authorization/policyAssignments/7bb64c0aa90247de8b4491c3",
               "assignmentName":"AppService-SKU",
               "viewDetailsUri":"https://portal.azure.com#blade/Microsoft_Azure_Policy/EditAssignmentBlade/id/%2Fproviders%2FMicrosoft.Management%2FmanagementGroups%2Ftriplecrown2%2Fproviders%2FMicrosoft.Authorization%2FpolicyAssignments%2F7bb64c0aa90247de8b4491c3"
            }
         ]
      }
   ]
}
serge
  • 185
  • 1
  • 13
  • If you scroll down the learning module a little bit, it is explained there. It should be proceeding these steps but it is not .. – David Louda Aug 18 '21 at 16:41

4 Answers4

12

I was also facing the same issue but was able to create a WordPress website when I changed the App service plan.

I created a new App Service plan F1 Pricing tier (Free) under Dev/Test and everything worked. :)

It looks like SandBox do not have permission to create any App Service Plan other than F1 (Free).

I have added screenshots for the steps. Step1 Step2

Saurav Kumar
  • 121
  • 4
2

I found that by default, the setup of the service plan defaults to "Production". If you select "Dev/Test" then S1 the exercise will complete as designed

1

The sandboxes only provide access to some resources in Azure... it looks like the error you get is because you are selecting an App Service plan which the sandbox doesn't give you the right to use.

Could you try choosing another App Service Plan? The lab is instructing to leave the one by default, but maybe you need to choose another one... if you get the same error choosing any App Service Plan, it may very well be that there is an error in the permissions Microsoft gave you to perform the lab.

asturmark
  • 46
  • 1
0

You do not need to create another plan but scale up/down the tier from the existing plan for on. enter image description here

Anyway, as I already commented these sandboxes have errors, it could be that Microsoft didn't provide the proper rights and it is impossible to perform the lab.

I recommend you are using a full subscription. You can get a trial version for a month with 120 euros credit.

asturmark
  • 46
  • 1