Azure / Azure/arm-template-whatif
Multiple Event Grid system topics on the same source not allowed but not caught by WhatIf
- Dominant language
- HTML
- Stars
- 101
- Forks
- 21
- Avg merge
- 3h 35m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
Multiple Event Grid system topics on the same source not allowed. If I write a bicep file with 2 topics point to the same source, WhatIf doesn't error out, but I'll get an error when trying to actually deploy it.
**To Reproduce**
Sample Bicep file
```
param storageAccountType string = 'Standard_LRS'
param location string = resourceGroup().location
param storageAccountName string = 'dfgsdfgsthrtwesdfg' // Change to other random string
param containerName string = 'testcontainer'
param eventGridSystemTopicName1 string = 'topic1'
param eventGridSystemTopicName2 string = 'topic2'
resource sa 'Microsoft.Storage/storageAccounts@2025-01-01' = {
name: storageAccountName
location: location
sku: {
name: storageAccountType
}
kind: 'StorageV2'
properties: {}
}
resource blob 'Microsoft.Storage/storageAccounts/blobServices@2025-01-01' = {
parent: sa
name: 'default'
}
resource container 'Microsoft.Storage/storageAccounts/blobServices/containers@2025-01-01' = {
parent: blob
name: containerName
}
resource eventGridSystemTopic1 'Microsoft.EventGrid/systemTopics@2023-12-15-preview' = {
name: eventGridSystemTopicName1
location: location
properties: {
source: sa.id
topicType: 'Microsoft.Storage.StorageAccounts'
}
}
resource eventGridSystemTopic2 'Microsoft.EventGrid/systemTopics@2023-12-15-preview' = {
name: eventGridSystemTopicName2
location: location
properties: {
source: sa.id
topicType: 'Microsoft.Storage.StorageAccounts'
}
}
```
**Expected behavior**
WhatIf to error out
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Client** CLI and GitHub action
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the supplied Bicep reproduction through the CLI What-If flow, then compare it with an actual deployment. Trace how the GitHub Action and CLI report duplicate Event Grid system topics for one source. Done means What-If rejects the two-topic configuration with an actionable error before deployment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100