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条答案
按热度按时间bxjv4tth1#
欢迎来到堆栈溢出和Azure!
出现此错误的原因是,作为练习的一部分,您正在创建
MySQL
资源,而您的Subscription管理员设置了不允许创建此类资源的策略。您需要与订阅管理员联系,以便他们更改策略以允许创建MySQL资源。
你可以在此处阅读有关Azure策略的详细信息:https://learn.microsoft.com/en-us/azure/governance/policy/overview.
wb1gzix02#
如果其他人看到此错误消息(很可能是因为您正在参加Microsoft学习路径),请确保您已完全按照练习中的说明进行了操作。
例如,如果它说位置需要是westus2,那么它应该是westus2,而不是westus或westus3。