Skip to content

Commit dc88a5c

Browse files
refactor: update AI project role assignment
1 parent 6b0b574 commit dc88a5c

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

infra/deploy_ai_foundry.bicep

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,19 @@ resource aiHubProject 'Microsoft.MachineLearningServices/workspaces@2024-01-01-p
156156
}
157157
}
158158

159+
resource aiDeveloper 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
160+
name: '64702f94-c441-49e6-a78b-ef80e0188fee'
161+
}
162+
163+
resource aiDevelopertoAIProject 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
164+
name: guid(aiHubProject.id, aiDeveloper.id)
165+
scope: resourceGroup()
166+
properties: {
167+
roleDefinitionId: aiDeveloper.id
168+
principalId: aiHubProject.identity.principalId
169+
}
170+
}
171+
159172
resource tenantIdEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
160173
parent: keyVault
161174
name: 'TENANT-ID'

infra/main.bicep

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -462,15 +462,6 @@ resource aiDeveloperAccessProj 'Microsoft.Authorization/roleAssignments@2022-04-
462462
}
463463
}
464464

465-
resource aiDevelopertoAIProject 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
466-
name: guid(aiServices.name, aiHubProject.id, aiDeveloper.id)
467-
scope: aiServices
468-
properties: {
469-
roleDefinitionId: aiDeveloper.id
470-
principalId: aiHubProject.identity.principalId
471-
}
472-
}
473-
474465
var cosmosAssignCli = 'az cosmosdb sql role assignment create --resource-group "${resourceGroup().name}" --account-name "${cosmos.name}" --role-definition-id "${cosmos::contributorRoleDefinition.id}" --scope "${cosmos.id}" --principal-id "${containerApp.identity.principalId}"'
475466

476467
module managedIdentityModule 'deploy_managed_identity.bicep' = {

0 commit comments

Comments
 (0)