skip to Main Content

I have no knowledge of Microsoft Azure whatsoever.

I am following the Microsoft online Path “Azure fundamentals”:
https://learn.microsoft.com/en-us/learn/paths/azure-fundamentals/

For the third module, “Core Cloud Services – Introduction to Azure”, for the first exercise “Exercise – Create a website hosted in Azure”, I got stuck, unable to go through the exercise.

The error that I found is:

{“telemetryId”:”88076050-7e0b-4188-ae04-c0ada8ca2356″,”bladeInstanceId”:”Blade_c6f20ee47e4744ac91acec54dbd57a83_10002_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”:”blogforleo-mysqldbserver”,”message”:”Resource ‘blogforleo-mysqldbserver’ was disallowed by policy. (Code: RequestDisallowedByPolicy)”,”additionalInfo”:[{“type”:”PolicyViolation”,”info”:{“policyDefinitionDisplayName”:”Allowed resource types”,”policySetDefinitionDisplayName”:”webapp”,”evaluationDetails”:{“evaluatedExpressions”:[{“result”:”False”,”expressionKind”:”Field”,”expression”:”type”,”path”:”type”,”expressionValue”:”Microsoft.DBforMySQL/servers”,”targetValue”:[“microsoft.resources/resourcegroups”,”microsoft.storage/storageaccounts”,”microsoft.web/sites”,”microsoft.web/serverfarms”,”microsoft.documentdb/databaseaccounts”,”microsoft.insights/components”,”microsoft.keyvault/vaults”,”microsoft.cache/redis”,”microsoft.servicebus/namespaces”,”microsoft.servicebus/namespaces/authorizationrules”,”microsoft.servicebus/namespaces/queues”,”microsoft.servicebus/namespaces/queues/authorizationrules”,”microsoft.servicebus/namespaces/topics”,”microsoft.servicebus/namespaces/topics/authorizationrules”,”microsoft.servicebus/namespaces/topics/subscriptions”,”microsoft.servicebus/namespaces/topics/subscriptions/rules”,”microsoft.cognitiveservices/accounts”,”microsoft.web/sites/slots”,”microsoft.web/sites/slots/instances”,”microsoft.web/sites/slots/metrics”,”microsoft.web/sites/metrics”,”microsoft.web/sites/instances”,”microsoft.web/certificates”,”microsoft.portal/dashboards”,”microsoft.containerregistry/registries”,”microsoft.containerregistry/registries/webhooks”,”microsoft.web/connections”,”microsoft.logic/workflows”,”microsoft.web/customapis”,”microsoft.search/searchservices”,”microsoft.network/trafficmanagerprofiles”,”microsoft.sql/servers”,”microsoft.sql/servers/databases”,”microsoft.signalrservice/signalr”,”microsoft.apimanagement/service”,”microsoft.dbforpostgresql/servers”,”microsoft.dbforpostgresql/serversv2″,”microsoft.web/sites/slots/metricdefinitions”,”microsoft.web/sites/metricdefinitions”,”microsoft.web/serverfarms/workers”,”microsoft.cdn/profiles”,”microsoft.cdn/profiles/endpoints”,”microsoft.network/connections”,”microsoft.network/localnetworkgateways”,”microsoft.network/publicipaddresses”,”microsoft.network/virtualnetworkgateways”,”microsoft.network/virtualnetworks”,”microsoft.network/networksecuritygroups”,”microsoft.relay/namespaces”,”microsoft.datafactory/factories”,”microsoft.machinelearningservices/workspaces”,”microsoft.machinelearningservices/workspaces/computes”,”microsoft.web/staticsites”,”microsoft.alertsmanagement/smartdetectoralertrules”,”microsoft.insights/actiongroups”],”operator”:”In”}]},”policyDefinitionId”:”/providers/Microsoft.Authorization/policyDefinitions/a08ec900-254a-4555-9bf5-e42af04b5c5c”,”policySetDefinitionId”:”/providers/Microsoft.Management/managementGroups/triplecrown2/providers/Microsoft.Authorization/policySetDefinitions/f06460e7-86f9-42ad-8955-fb55bad92028″,”policyDefinitionReferenceId”:”8272972042953317437″,”policySetDefinitionName”:”f06460e7-86f9-42ad-8955-fb55bad92028″,”policyDefinitionName”:”a08ec900-254a-4555-9bf5-e42af04b5c5c”,”policyDefinitionEffect”:”deny”,”policyAssignmentId”:”/providers/Microsoft.Management/managementGroups/triplecrown2/providers/Microsoft.Authorization/policyAssignments/4a0a4629d22043e6a70a69f9″,”policyAssignmentName”:”4a0a4629d22043e6a70a69f9″,”policyAssignmentDisplayName”:”webapp”,”policyAssignmentScope”:”/providers/Microsoft.Management/managementGroups/triplecrown2″,”policyAssignmentParameters”:{}}}],”policyDetails”:[{“isInitiative”:true,”assignmentId”:”/providers/Microsoft.Management/managementGroups/triplecrown2/providers/Microsoft.Authorization/policyAssignments/4a0a4629d22043e6a70a69f9″,”assignmentName”:”webapp”,”auxDefinitionNames”:[“Allowed resource types”],”viewDetailsUri”:”https://portal.azure.com#blade/Microsoft_Azure_Policy/EditAssignmentBladeV2/assignmentId/%2Fproviders%2FMicrosoft.Management%2FmanagementGroups%2Ftriplecrown2%2Fproviders%2FMicrosoft.Authorization%2FpolicyAssignments%2F4a0a4629d22043e6a70a69f9“}]}]}

Any help will be much appreciated.

Thank you,
Leo

2

Answers


  1. Welcome to Stack Overflow and Azure!

    The reason you’re getting this error is because as part of your exercise you’re creating a MySQL resource and your Subscription Administrator has set a policy that disallows the creation of such resources.

    You will need to contact your Subscription Administrator so that they can change the policy to allow creation of MySQL resources.

    You can read more about Azure Policy here: https://learn.microsoft.com/en-us/azure/governance/policy/overview.

    Login or Signup to reply.
  2. Should others see this error message – most likely because you are taking part of a Microsoft Learning Path, then ensure you have done exactly as described in the exercise.

    So if for instance it says location needs to be westus2, then it should be west us 2 and not westus or westus3.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search