Skip to content

Commit c1e6d53

Browse files
bnodirnb-a153pamelafox
authored
Skip role assignments for free Azure Search SKU (#2848) (#2886)
* Fix: skip role assignments when principalId is empty to avoid InvalidPrincipalId for free Search SKU (#2848) * Add checks to each role in main.bicep that is assigned to searchService.outputs.systemAssignedPrincipalId * Add checks to each role in main.bicep that is assigned to searchService.outputs.systemAssignedPrincipalId * Add limitations in docs * Revert unneeded change to role.bicep --------- Co-authored-by: bnodir <[email protected]> Co-authored-by: Pamela Fox <[email protected]> Co-authored-by: Pamela Fox <[email protected]>
1 parent 57666a1 commit c1e6d53

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/deploy_lowcost.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ However, if your goal is to minimize costs while prototyping your application, f
5454
reuse your [existing search service](../README.md#existing-azure-ai-search-resource).
5555
2. The free tier does not support semantic ranker, so the app UI will no longer display
5656
the option to use the semantic ranker. Note that will generally result in [decreased search relevance](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/azure-ai-search-outperforming-vector-search-with-hybrid-retrieval-and-ranking-ca/3929167).
57+
3. The free tier does not support managed identities. As a result, cloud ingestion and multimodal/vector features that require role assignments to the search service principal will have those role assignments skipped during provisioning. If you need those permissions, use a non-free tier (for example, `Basic`/`B1` or `Standard`).
5758

5859
1. Use the free tier of Azure Document Intelligence (used in analyzing files):
5960

infra/main.bicep

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ module openAiRoleBackend 'core/security/role.bicep' = if (isAzureOpenAiHost && d
11541154
}
11551155
}
11561156

1157-
module openAiRoleSearchService 'core/security/role.bicep' = if (isAzureOpenAiHost && deployAzureOpenAi) {
1157+
module openAiRoleSearchService 'core/security/role.bicep' = if (isAzureOpenAiHost && deployAzureOpenAi && searchServiceSkuName != 'free') {
11581158
scope: openAiResourceGroup
11591159
name: 'openai-role-searchservice'
11601160
params: {
@@ -1164,7 +1164,7 @@ module openAiRoleSearchService 'core/security/role.bicep' = if (isAzureOpenAiHos
11641164
}
11651165
}
11661166

1167-
module visionRoleSearchService 'core/security/role.bicep' = if (useMultimodal) {
1167+
module visionRoleSearchService 'core/security/role.bicep' = if (useMultimodal && searchServiceSkuName != 'free') {
11681168
scope: visionResourceGroup
11691169
name: 'vision-role-searchservice'
11701170
params: {
@@ -1199,7 +1199,7 @@ module storageOwnerRoleBackend 'core/security/role.bicep' = if (useUserUpload) {
11991199
}
12001200

12011201
// Search service needs blob read access for both integrated vectorization and cloud ingestion indexer data source
1202-
module storageRoleSearchService 'core/security/role.bicep' = if (useIntegratedVectorization || useCloudIngestion) {
1202+
module storageRoleSearchService 'core/security/role.bicep' = if ((useIntegratedVectorization || useCloudIngestion) && searchServiceSkuName != 'free') {
12031203
scope: storageResourceGroup
12041204
name: 'storage-role-searchservice'
12051205
params: {
@@ -1209,7 +1209,7 @@ module storageRoleSearchService 'core/security/role.bicep' = if (useIntegratedVe
12091209
}
12101210
}
12111211

1212-
module storageRoleContributorSearchService 'core/security/role.bicep' = if (useIntegratedVectorization && useMultimodal) {
1212+
module storageRoleContributorSearchService 'core/security/role.bicep' = if ((useIntegratedVectorization && useMultimodal) && searchServiceSkuName != 'free') {
12131213
scope: storageResourceGroup
12141214
name: 'storage-role-contributor-searchservice'
12151215
params: {

0 commit comments

Comments
 (0)