Skip to content

Commit 2bc82e9

Browse files
BicepChangesRole
1 parent 12c8e93 commit 2bc82e9

File tree

3 files changed

+42623
-8
lines changed

3 files changed

+42623
-8
lines changed

infra/main.bicep

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ param existingLogAnalyticsWorkspaceId string = ''
2020

2121
param azureopenaiVersion string = '2025-01-01-preview'
2222

23-
// ADD AFTER LINE 22 - Get the current deployer's information
23+
//Get the current deployer's information
2424
var deployerInfo = deployer()
2525
var deployingUserPrincipalId = deployerInfo.objectId
2626
var enableUserRoleAssignment = !empty(deployingUserPrincipalId)
@@ -817,7 +817,6 @@ module cogServiceRoleAssignmentsExisting './modules/role.bicep' = if(useExisting
817817
scope: resourceGroup( split(existingFoundryProjectResourceId, '/')[2], split(existingFoundryProjectResourceId, '/')[4])
818818
}
819819

820-
// ADD AFTER LINE 700 - User Role Assignment for Azure OpenAI
821820
// User Role Assignment for Azure OpenAI - New Resources
822821
module userOpenAiRoleAssignment './modules/role.bicep' = if (enableUserRoleAssignment && aiFoundryAIservicesEnabled && !useExistingResourceId) {
823822
name: take('user-openai-${uniqueString(deployingUserPrincipalId, aiFoundryAiServicesResourceName)}', 64)
@@ -922,7 +921,7 @@ module cosmosDb 'br/public:avm/res/document-db/database-account:0.12.0' = if (co
922921
capabilitiesToAdd: [
923922
'EnableServerless'
924923
]
925-
// REPLACE LINE 773
924+
926925
sqlRoleAssignmentsPrincipalIds: concat(
927926
[containerApp.outputs.?systemAssignedMIPrincipalId],
928927
enableUserRoleAssignment ? [deployingUserPrincipalId] : []
@@ -1778,6 +1777,5 @@ output AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME string = aiFoundryAiServicesModelDep
17781777
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
17791778
output APP_ENV string = 'Prod'
17801779

1781-
// ADD AFTER LINE 941
17821780
output deployerInfo object = deployerInfo
17831781
output userRoleAssignmentStatus string = enableUserRoleAssignment ? 'User ${deployingUserPrincipalId} (${deployerInfo.?userPrincipalName ?? 'N/A'}) has been granted access to Cosmos DB and Azure OpenAI' : 'No user role assignment configured.'

0 commit comments

Comments
 (0)