-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Skip role assignments for free Azure Search SKU (#2848) #2886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip role assignments for free Azure Search SKU (#2848) #2886
Conversation
…PrincipalId for free Search SKU (Azure-Samples#2848)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a conditional guard to prevent role assignment creation when the principalId is empty, specifically addressing issues with the free Azure Search SKU which does not support managed identities.
- Added an
if (!empty(principalId))condition to the role assignment resource inrole.bicep
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@bnodir Thanks! I think it would be clearer to add those checks to each role in main.bicep that is assigned to searchService.outputs.systemAssignedPrincipalId openAiRoleSearchService I'm guessing it's failing on: But they could each have the check. You don't have an issue in searchmanager when it tries to set up the vectorizer? |
…ce.outputs.systemAssignedPrincipalId
…ce.outputs.systemAssignedPrincipalId
|
@pamelafox Thanks for the detailed breakdown! I’ve applied the changes and added a note in the docs about the free SKU limitation. |
Was looking for that note last week, after a long search I discovered that limitation! Good to see your contribution! |
|
Thanks @bnodir! Approved and merging. |
Add conditional guards so Microsoft.Authorization/roleAssignments are only created when principalId is non-empty. Prevents InvalidPrincipalId errors when using the free Azure Search SKU. Fixes #2848