|
5 | 5 | "_generator": { |
6 | 6 | "name": "bicep", |
7 | 7 | "version": "0.36.1.42791", |
8 | | - "templateHash": "5809090349009875682" |
| 8 | + "templateHash": "373408339880701879" |
9 | 9 | } |
10 | 10 | }, |
11 | 11 | "parameters": { |
|
667 | 667 | "_generator": { |
668 | 668 | "name": "bicep", |
669 | 669 | "version": "0.36.1.42791", |
670 | | - "templateHash": "9604789250113151596" |
| 670 | + "templateHash": "8370604725704200425" |
671 | 671 | } |
672 | 672 | }, |
673 | 673 | "parameters": { |
|
1157 | 1157 | "[resourceId('Microsoft.Search/searchServices', variables('aiSearchName'))]" |
1158 | 1158 | ] |
1159 | 1159 | }, |
| 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 | + }, |
1160 | 1175 | { |
1161 | 1176 | "type": "Microsoft.Authorization/roleAssignments", |
1162 | 1177 | "apiVersion": "2022-04-01", |
|
1488 | 1503 | ] |
1489 | 1504 | }, |
1490 | 1505 | { |
| 1506 | + "condition": "[not(empty(parameters('azureExistingAIProjectResourceId')))]", |
1491 | 1507 | "type": "Microsoft.Resources/deployments", |
1492 | 1508 | "apiVersion": "2022-09-01", |
1493 | 1509 | "name": "assignFoundryRoleToMI", |
|
0 commit comments