fix: Event Grid MI issue#2274
Open
Vamshi-Microsoft wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request implements a durable fix for the Event Grid system-topic subscription and role-assignment ordering issue (BUG-0061) in the Bicep infrastructure code, ensuring that role assignments are created before event subscriptions to prevent authorization errors during provisioning. It also applies consistent formatting improvements and minor refactors across the Bicep file for readability and maintainability.
Event Grid and Role Assignment Ordering Fix:
main.bicepso that the role assignment (eventGridQueueSenderRole) is created before the event subscription (newEventGridSubscription), breaking the chicken-and-egg problem that caused managed identity authorization failures on freshazd up. The subscription is now a standalone resource that depends on the role assignment, matching the pattern used for existing topics. [1] [2]Formatting and Readability Improvements:
main.bicep. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]Documentation Updates:
worklog/2026-06-23.md) documenting the fix, rationale, and next steps for verifying the Event Grid provisioning flow.bugs.mdto reflect the applied durable fix and lessons learned.These changes ensure the infrastructure provisioning is reliable and idempotent, preventing manual intervention and improving maintainability.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information