Home › Forums › Azure › Received an error while following the guided lab for Creating an Azure Cosmos DB › Reply To: Received an error while following the guided lab for Creating an Azure Cosmos DB
-
Hi JR, thank you for assisting me with this. Attached is the request screenshot of the Review + Create page you requested. I’m also including the full error. Please let me know if anything else is needed.
{
“code”: “InvalidTemplateDeployment”,
“message”: “The template deployment failed because of policy violation. Please see details for more information.”,
“details”: [
{
“code”: “RequestDisallowedByPolicy”,
“target”: “sean-db”,
“message”: “Resource ‘sean-db’ was disallowed by policy. Policy identifiers: ‘[{\”policyAssignment\”:{\”name\”:\”database-restriction-azure-lab-rg-KV3AMEMseJB8\”,\”id\”:\”/subscriptions/02ab71f8-4a53-4bb4-af26-ead3a81c9750/resourceGroups/azure-lab-rg-KV3AMEMseJB8/providers/Microsoft.Authorization/policyAssignments/database-restriction-azure-lab-rg-KV3AMEMseJB8\”},\”policyDefinition\”:{\”name\”:\”Allow only cost-effective database configurations for labs\”,\”id\”:\”/subscriptions/02ab71f8-4a53-4bb4-af26-ead3a81c9750/providers/Microsoft.Authorization/policyDefinitions/restrict-database-tiers-lab-shared\”,\”version\”:\”1.0.0\”}}]’.”,
“additionalInfo”: [
{
“type”: “PolicyViolation”,
“info”: {
“evaluationDetails”: {
“evaluatedExpressions”: [
{
“result”: “True”,
“expressionKind”: “Field”,
“expression”: “type”,
“path”: “type”,
“expressionValue”: “Microsoft.DocumentDb/databaseAccounts”,
“targetValue”: “Microsoft.DocumentDB/databaseAccounts”,
“operator”: “Equals”
},
{
“result”: “True”,
“expressionKind”: “Field”,
“expression”: “type”,
“path”: “type”,
“expressionValue”: “Microsoft.DocumentDb/databaseAccounts”,
“targetValue”: “Microsoft.DocumentDB/databaseAccounts”,
“operator”: “Equals”
},
{
“result”: “True”,
“expressionKind”: “Field”,
“expression”: “Microsoft.DocumentDB/databaseAccounts/capacityMode”,
“path”: “properties.capacityMode”,
“expressionValue”: “Serverless”,
“targetValue”: “Provisioned”,
“operator”: “NotEquals”
}
]
},
“policyDefinitionId”: “/subscriptions/02ab71f8-4a53-4bb4-af26-ead3a81c9750/providers/Microsoft.Authorization/policyDefinitions/restrict-database-tiers-lab-shared”,
“policyDefinitionName”: “restrict-database-tiers-lab-shared”,
“policyDefinitionDisplayName”: “Allow only cost-effective database configurations for labs”,
“policyDefinitionVersion”: “1.0.0”,
“policyDefinitionEffect”: “deny”,
“policyAssignmentId”: “/subscriptions/02ab71f8-4a53-4bb4-af26-ead3a81c9750/resourceGroups/azure-lab-rg-KV3AMEMseJB8/providers/Microsoft.Authorization/policyAssignments/database-restriction-azure-lab-rg-KV3AMEMseJB8”,
“policyAssignmentName”: “database-restriction-azure-lab-rg-KV3AMEMseJB8”,
“policyAssignmentDisplayName”: “”,
“policyAssignmentScope”: “/subscriptions/02ab71f8-4a53-4bb4-af26-ead3a81c9750/resourceGroups/azure-lab-rg-KV3AMEMseJB8”,
“policyAssignmentParameters”: {},
“policyExemptionIds”: [],
“policyEnrollmentIds”: []
}
}
]
}
]
}