Azure / Azure/data-management-zone

Bug: Policies - Synapse diagnostic setting deployments have incorrect name

Open
#303 0 comments 0 reactions 1 assignee Claimed by @marvinbuss View on GitHub
backlog bug
Dominant language
Bicep
Stars
180
Forks
95
PR merge metrics
No merged PRs in 30d

Description

### Deployment Mode

Azure DevOps

### Steps to reproduce

I know these are just FYI-templates, but updating would be a good addition.

When creating a remediation task for policies "params.synapseSparkPool" and "params.synapseSqlPool", an error is raised.

The files are missing the name of the Synapse resource itself in 'parameters.policyDefinition.then.details.deployment.properties.template.resources.name'. Logic is Sparkname/Microsoft.Insights/setByPolicy but should be Synapsename/Sparkname/Microsoft.Insights/setByPolicy

### Error Message

```json
Example from Spark pool:

Deployment template validation failed: 'The template resource 'xx/Microsoft.Insights/setByPolicy' for type 'Microsoft.Synapse/workspaces/bigDataPools/providers/diagnosticSettings' at line '1' and column '410' 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.'.
```

### Screenshots

![image](https://user-images.githubusercontent.com/76433857/187384490-e41f28fa-19f4-403f-9248-5486d6ddd4ab.png)

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/Azure/data-management-zone/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.