Skip to content

Commit b5c58af

Browse files
Pavan-MicrosoftHarmanpreet KaurPrajwal-MicrosoftHarmanpreet-Microsoft
authored
fix: Refine Azure Cognitive Services Infra: Role Assignments and Storage-Only Network Access (#1902)
Co-authored-by: Harmanpreet Kaur <[email protected]> Co-authored-by: Prajwal-Microsoft <[email protected]> Co-authored-by: Harmanpreet-Microsoft <[email protected]>
1 parent bc3ec26 commit b5c58af

File tree

3 files changed

+1367
-16
lines changed

3 files changed

+1367
-16
lines changed

infra/main.bicep

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,8 @@ module openai 'modules/core/ai/cognitiveservices.bicep' = {
695695
userAssignedResourceId: managedIdentityModule.outputs.managedIdentityOutput.id
696696
restrictOutboundNetworkAccess: true
697697
allowedFqdnList: [
698-
'${azureOpenAIResourceName}.openai.azure.com'
699-
'login.microsoftonline.com'
700-
'sts.windows.net'
698+
'${storageAccountName}.blob.${environment().suffixes.storage}'
699+
'${storageAccountName}.queue.${environment().suffixes.storage}'
701700
]
702701
enablePrivateNetworking: enablePrivateNetworking
703702
subnetResourceId: enablePrivateNetworking ? network!.outputs.subnetPrivateEndpointsResourceId : null
@@ -1305,6 +1304,14 @@ module formrecognizer 'modules/core/ai/cognitiveservices.bicep' = {
13051304
principalType: 'User'
13061305
}
13071306
] : [])
1307+
systemAssignedRoleAssignments: [
1308+
{
1309+
resourceId: storage.outputs.id
1310+
roleName: 'Storage Blob Data Contributor'
1311+
roleDefinitionId: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
1312+
principalType: 'ServicePrincipal'
1313+
}
1314+
]
13081315
}
13091316
dependsOn: enablePrivateNetworking ? avmPrivateDnsZones : []
13101317
}

0 commit comments

Comments
 (0)