question

SVMCloud avatar image
0 Votes"
SVMCloud asked VineetKumarGupta-6574 answered

The template deployment failed because of policy violation.

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
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SVMCloud Azure Policy enforces organization standards and check compliance of resources. Based on the information, there seems to be a Azure Policy Definition which allows only App Service Plan with specific tiers among the available tiers ( Free ,Shared (preview) ,Standard, Premium, PremiumV2, PremiumV3, Isolated). Kindly check the allowed tiers in your subscription. For more information , on how to check tiers allowed, refer this article.


1 Vote 1 ·
olufemiaMSFT avatar image
0 Votes"
olufemiaMSFT answered olufemiaMSFT commented

Hello @SVMCloud,

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks, everyone, for your help. While I can't explain why, the issue resolved itself.

I can only imagine an agent pressed <CTRL> + <ALT> + <DEL> and restarted Azure. :)

1 Vote 1 ·

Happy this is now resolved. Dont hesitate to ping if the issue persists.

Have a good weekend.

0 Votes 0 ·
sandeepdingria-8806 avatar image
0 Votes"
sandeepdingria-8806 answered Lainors7 commented

Facing same problem, can you please help.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have exactly the same problem.

1 Vote 1 ·

I am facing the same issue

1 Vote 1 ·

Same issue, can't create a resource WordPress.
RequestDisallowedByPolicy

0 Votes 0 ·
34891775 avatar image
0 Votes"
34891775 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VineetKumarGupta-6574 avatar image
0 Votes"
VineetKumarGupta-6574 answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.