Skip to content

fix: Refactor event grid topic configuration for simplified identity handling#2275

Open
Vamshi-Microsoft wants to merge 2 commits into
Azure-Samples:dev-v2from
Vamshi-Microsoft:vk-psl-eventhubroles
Open

fix: Refactor event grid topic configuration for simplified identity handling#2275
Vamshi-Microsoft wants to merge 2 commits into
Azure-Samples:dev-v2from
Vamshi-Microsoft:vk-psl-eventhubroles

Conversation

@Vamshi-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request refactors the v2/infra/main.bicep file to improve code readability and maintainability by consistently applying multi-line formatting to complex expressions and parameters, especially for conditional assignments and resource properties. It also comments out/deactivates certain Event Grid system topic role assignments and delivery identity settings, likely as part of a configuration or deployment change.

Key changes include:

Code formatting and readability improvements:

  • Reformatted conditional assignments and array/object literals throughout the file to use multi-line formatting, making the logic clearer and easier to maintain. This affects conditionals for resource properties, variable assignments, and module parameters. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]

Event Grid system topic and role assignment adjustments:

  • Commented out the managedIdentities property and the deliveryWithResourceIdentity block in the eventGridSystemTopic module, switching to direct destination configuration for Storage Queue delivery. This may reflect a change in authentication or deployment strategy. [1] [2]
  • Commented out the eventGridQueueSenderRole resource assignment, possibly deactivating an explicit role assignment for the Event Grid system topic's managed identity.

Consistent variable assignment style:

  • Updated several variable assignments (such as effectiveOpenAiEndpoint, effectiveSearchName, effectiveSearchEndpoint, effectiveStorageBlobEndpoint, effectiveCosmosName, and effectiveCosmosEndpoint) to use a multi-line, ternary-style format for improved clarity. [1] [2] [3] [4]

These changes do not alter the core logic or functionality but make the infrastructure codebase easier to read and maintain, and reflect some configuration changes around Event Grid integration.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Removed deliveryWithResourceIdentity from the Event Grid → blob-events
queue subscription and use a plain StorageQueue destination instead.
Enable allowSharedKeyAccess on the storage account so Event Grid can
deliver without MI authorization (which was failing with
"Eventhub
Managed Identity Authorization Error").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant