Skip to content

Commit eeef63f

Browse files
updated main.json
1 parent 71bfd28 commit eeef63f

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

infra/main.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"_generator": {
66
"name": "bicep",
77
"version": "0.36.1.42791",
8-
"templateHash": "5809090349009875682"
8+
"templateHash": "373408339880701879"
99
}
1010
},
1111
"parameters": {
@@ -667,7 +667,7 @@
667667
"_generator": {
668668
"name": "bicep",
669669
"version": "0.36.1.42791",
670-
"templateHash": "9604789250113151596"
670+
"templateHash": "8370604725704200425"
671671
}
672672
},
673673
"parameters": {
@@ -1157,6 +1157,21 @@
11571157
"[resourceId('Microsoft.Search/searchServices', variables('aiSearchName'))]"
11581158
]
11591159
},
1160+
{
1161+
"condition": "[empty(parameters('azureExistingAIProjectResourceId'))]",
1162+
"type": "Microsoft.Authorization/roleAssignments",
1163+
"apiVersion": "2022-04-01",
1164+
"scope": "[format('Microsoft.CognitiveServices/accounts/{0}', variables('aiServicesName'))]",
1165+
"name": "[guid(resourceGroup().id, resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), resourceId('Microsoft.Authorization/roleDefinitions', '53ca6127-db72-4b80-b1b0-d745d6d5456d'))]",
1166+
"properties": {
1167+
"principalId": "[parameters('managedIdentityObjectId')]",
1168+
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '53ca6127-db72-4b80-b1b0-d745d6d5456d')]",
1169+
"principalType": "ServicePrincipal"
1170+
},
1171+
"dependsOn": [
1172+
"[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
1173+
]
1174+
},
11601175
{
11611176
"type": "Microsoft.Authorization/roleAssignments",
11621177
"apiVersion": "2022-04-01",
@@ -1488,6 +1503,7 @@
14881503
]
14891504
},
14901505
{
1506+
"condition": "[not(empty(parameters('azureExistingAIProjectResourceId')))]",
14911507
"type": "Microsoft.Resources/deployments",
14921508
"apiVersion": "2022-09-01",
14931509
"name": "assignFoundryRoleToMI",

0 commit comments

Comments
 (0)