The template deployment failed because of policy violation.

SVM 6 Reputation points
2021-02-04T16:58:37.947+00:00

When I attempt to run through Exercise1 - Create a WordPress website hosted in Auzure, I encounter "The template deployment failed because of policy violation." while creating the WordPress

Detailed: Information:

"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": **************************
"message": "Resource 'ServicePlan******************' was disallowed by policy. Policy identifiers: '[{\"policyAssignment\":{\"name\":\"AppService-SKU\",\"id\":\"/providers/Microsoft.Management/managementGroups/triplecrown2/providers/Microsoft.Authorization/policyAssignments/*********************\"},\"policyDefinition\":{\"name\":\"AppService-SKU\",\"id\":\"/providers/Microsoft.Management/managementGroups/************************/providers/Microsoft.Authorization/policyDefinitions/****************************\"}}]'.",
`

Has anyone run into this issue and successfully resolved it? (*s have been replaced unique IDs.)

Thank you.

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
793 questions
{count} votes

6 answers

Sort by: Most helpful
  1. olufemia-MSFT 2,861 Reputation points
    2021-02-05T04:50:56.557+00:00

    Hello @SVM ,

    As called out by @SwathiDhanwada-MSFT - the policy violation was thrown because there's an Azure Policy definition on the subscription restricting the SKU/tier of Appservice resource you can deploy for this excercise.

    To resolve, re-run the excercise using either Free or Shared (preview) tiers of AppService resource.
    Let us know if issue persists and we will gladly assist further.

    Cheers.


  2. sandeep dingria 1 Reputation point
    2021-10-10T04:40:50.113+00:00

    Facing same problem, can you please help.


  3. Alex G 1 Reputation point
    2021-10-11T22:00:15.647+00:00

    I have the same problem and cant change to F1 plan: you have no rigthts to create resource groups.

    0 comments No comments

  4. Vineet Kumar Gupta 161 Reputation points
    2022-04-12T14:15:59.077+00:00

    Please check Azure policy which is associated with your subscription/Resources group/ management group and also check your roles .

    At least you should be contributor access (will be good if you have owner or global administrator level access )at given subscription or Resources group

    Any Azure Policy associated with your subscription blocking this process.

    0 comments No comments

  5. FADLI Hicham 0 Reputation points
    2024-03-10T18:07:55.8566667+00:00

    same problem

    0 comments No comments