Azure / data-management-zone

Template to deploy the Data Management Zone of Cloud Scale Analytics (former Enterprise-Scale Analytics). The Data Management Zone provides data governance and management capabilities for the data platform of an organization.
MIT License
169 stars 87 forks source link

Bug: Error with Policy setting Synapse Spark Pool Diagnostic Settings #270

Closed vidyann closed 2 years ago

vidyann commented 2 years ago

Deployment Mode

Deploy To Azure

Steps to reproduce

  1. Download the policies from here https://github.com/Azure/data-management-zone/blob/main/infra/Policies/PolicyDefinitions/DiagnosticSettings/params.synapseSparkPool.json https://github.com/Azure/data-management-zone/blob/main/infra/Policies/PolicyDefinitions/deploy.policyDefinition.mg.json
  2. Use Custom Deployment from portal to deploy from Portal.
  3. Assign the policy to Management group from portal.
  4. Create Synapse Workspace and Spatk pool from portal.
  5. DeployIfNotExists activity fails with error as provided in Error Message

Error Message

The error shown below:
"errorMessage": "Deployment creation for policy definition '/providers/Microsoft.Management/managementGroups/JIO-PLAFORMS-LIMITED/providers/Microsoft.Authorization/policyDefinitions/DiagnosticSettings-SynapseSparkPool-LogAnalytics/' and assignment '/providers/Microsoft.Management/managementGroups/Landing-Zones/providers/Microsoft.Authorization/policyAssignments/6e0b431afe0748b393a58270/' and deployment '/subscriptions/77c9f2b0-5c92-4f20-9594-18fe3a5b432a/resourceGroups/ja-rgr-dev-001/providers/Microsoft.Resources/deployments/PolicyDeployment_2610591527022697944' failed with error: '{"error":{"code":"InvalidTemplate","message":"Deployment template validation failed: 'The template resource 'spark1/Microsoft.Insights/setByPolicy' for type 'Microsoft.Synapse/workspaces/bigDataPools/providers/diagnosticSettings' at line '1' and column '409' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-template/#resources for usage details.'.","additionalInfo":[{"type":"TemplateViolation","info":{"lineNumber":1,"linePosition":409,"path":"properties.template.resources[0].type"}}]}}'."

Thanks!
Vidya

Screenshots

No response

Code of Conduct

marvinbuss commented 2 years ago

Hi @vidyann, Thanks for reporting this. Let me look into this and fix this. You will soon see a PR to fix this bug.