Hi Team,
I tried to execute example on below link but is getting failed. Can somebody help in understanding the error in ARM template?
https://docs.microsoft.com/en-us/learn/modules/build-azure-vm-templates/4-deploy-a-vm-quickstart-template?pivots=windows-cloud
template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.json"
Output/ Error:
{"error": {
"code": "InvalidTemplateDeployment",
"details": [
{
"additionalInfo": [
{
"info": {
"evaluationDetails": {
"evaluatedExpressions": [
{
"expression": "type",
"expressionValue": "Microsoft.Compute/virtualMachines",
"operator": "Equals",
"path": "type",
"result": "True",
"targetValue": "Microsoft.Compute/virtualMachines"
},
{
"expression": "Microsoft.Compute/virtualMachines/sku.name",
"expressionValue": "Standard_A2",
"operator": "In",
"path": "properties.hardwareProfile.vmSize",
"result": "False",
"targetValue": [
"Standard_A1_v2",
"Standard_A1",
"Standard_DS1_v2",
"Standard_DS2_v2",
"Standard_D2s_v3",
"Standard_DS3_v2"
]
}
]
},
"policyAssignmentDisplayName": "vm-sku",
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/triplecrown4/providers/Microsoft.Authorization/policyAssignments/ef2f5efb261648f48812605c",
"policyAssignmentName": "ef2f5efb261648f48812605c",
"policyAssignmentParameters": {},
"policyAssignmentScope": "/providers/Microsoft.Management/managementGroups/triplecrown4",
"policyDefinitionDisplayName": "vm-sku",
"policyDefinitionEffect": "Deny",
"policyDefinitionId": "/providers/Microsoft.Management/managementGroups/triplecrown4/providers/Microsoft.Authorization/policyDefinitions/10ba9b7a-1872-4625-b35c-9695ced300fb",
"policyDefinitionName": "10ba9b7a-1872-4625-b35c-9695ced300fb"
},
"type": "PolicyViolation"
}
],
"code": "RequestDisallowedByPolicy",
"details": null,
"message": "Resource 'SimpleWinVM' was disallowed by policy. Policy identifiers: '[{\"policyAssignment\":{\"name\":\"vm-sku\",\"id\":\"/providers/Microsoft.Management/managementGroups/triplecrown4/providers/Microsoft.Authorization/policyAssignments/ef2f5efb261648f48812605c\"},\"policyDefinition\":{\"name\":\"vm-sku\",\"id\":\"/providers/Microsoft.Management/managementGroups/triplecrown4/providers/Microsoft.Authorization/policyDefinitions/10ba9b7a-1872-4625-b35c-9695ced300fb\"}}]'.",
"target": "SimpleWinVM"
}
],
"message": "The template deployment failed because of policy violation. Please see details for more information.",
"target": null
},
"properties": null
}
Thank you.