|
6 | 6 | "_generator": { |
7 | 7 | "name": "bicep", |
8 | 8 | "version": "0.37.4.10188", |
9 | | - "templateHash": "13729415444270857669" |
| 9 | + "templateHash": "14194719810689418497" |
10 | 10 | } |
11 | 11 | }, |
12 | 12 | "parameters": { |
|
359 | 359 | "sqlServer": 9, |
360 | 360 | "search": 10 |
361 | 361 | }, |
362 | | - "aiRelatedDnsZoneIndices": [ |
363 | | - "[variables('dnsZoneIndex').cognitiveServices]", |
364 | | - "[variables('dnsZoneIndex').openAI]", |
365 | | - "[variables('dnsZoneIndex').aiServices]" |
366 | | - ], |
367 | 362 | "userAssignedIdentityResourceName": "[format('id-{0}', variables('solutionSuffix'))]", |
368 | | - "sqlUserAssignedIdentityResourceName": "[format('id-sql-{0}', variables('solutionSuffix'))]", |
| 363 | + "backendUserAssignedIdentityResourceName": "[format('id-backend-{0}', variables('solutionSuffix'))]", |
369 | 364 | "keyVaultName": "[format('kv-{0}', variables('solutionSuffix'))]", |
370 | 365 | "existingOpenAIEndpoint": "[if(not(empty(parameters('existingAiFoundryAiProjectResourceId'))), format('https://{0}.openai.azure.com/', split(parameters('existingAiFoundryAiProjectResourceId'), '/')[8]), '')]", |
371 | 366 | "existingProjEndpoint": "[if(not(empty(parameters('existingAiFoundryAiProjectResourceId'))), format('https://{0}.services.ai.azure.com/api/projects/{1}', split(parameters('existingAiFoundryAiProjectResourceId'), '/')[8], split(parameters('existingAiFoundryAiProjectResourceId'), '/')[10]), '')]", |
@@ -20485,18 +20480,18 @@ |
20485 | 20480 | } |
20486 | 20481 | } |
20487 | 20482 | }, |
20488 | | - "sqlUserAssignedIdentity": { |
| 20483 | + "backendUserAssignedIdentity": { |
20489 | 20484 | "type": "Microsoft.Resources/deployments", |
20490 | 20485 | "apiVersion": "2022-09-01", |
20491 | | - "name": "[take(format('avm.res.managed-identity.user-assigned-identity.{0}', variables('sqlUserAssignedIdentityResourceName')), 64)]", |
| 20486 | + "name": "[take(format('avm.res.managed-identity.user-assigned-identity.{0}', variables('backendUserAssignedIdentityResourceName')), 64)]", |
20492 | 20487 | "properties": { |
20493 | 20488 | "expressionEvaluationOptions": { |
20494 | 20489 | "scope": "inner" |
20495 | 20490 | }, |
20496 | 20491 | "mode": "Incremental", |
20497 | 20492 | "parameters": { |
20498 | 20493 | "name": { |
20499 | | - "value": "[variables('sqlUserAssignedIdentityResourceName')]" |
| 20494 | + "value": "[variables('backendUserAssignedIdentityResourceName')]" |
20500 | 20495 | }, |
20501 | 20496 | "location": { |
20502 | 20497 | "value": "[parameters('location')]" |
|
24333 | 24328 | "principalId": "[reference('userAssignedIdentity').outputs.principalId.value]", |
24334 | 24329 | "principalType": "ServicePrincipal" |
24335 | 24330 | }, |
| 24331 | + { |
| 24332 | + "roleDefinitionIdOrName": "53ca6127-db72-4b80-b1b0-d745d6d5456d", |
| 24333 | + "principalId": "[reference('backendUserAssignedIdentity').outputs.principalId.value]", |
| 24334 | + "principalType": "ServicePrincipal" |
| 24335 | + }, |
24336 | 24336 | { |
24337 | 24337 | "roleDefinitionIdOrName": "64702f94-c441-49e6-a78b-ef80e0188fee", |
24338 | 24338 | "principalId": "[reference('userAssignedIdentity').outputs.principalId.value]", |
|
24342 | 24342 | "roleDefinitionIdOrName": "5e0bd9bd-7b93-4f28-af87-19fc36ad61bd", |
24343 | 24343 | "principalId": "[reference('userAssignedIdentity').outputs.principalId.value]", |
24344 | 24344 | "principalType": "ServicePrincipal" |
| 24345 | + }, |
| 24346 | + { |
| 24347 | + "roleDefinitionIdOrName": "64702f94-c441-49e6-a78b-ef80e0188fee", |
| 24348 | + "principalId": "[reference('backendUserAssignedIdentity').outputs.principalId.value]", |
| 24349 | + "principalType": "ServicePrincipal" |
| 24350 | + }, |
| 24351 | + { |
| 24352 | + "roleDefinitionIdOrName": "5e0bd9bd-7b93-4f28-af87-19fc36ad61bd", |
| 24353 | + "principalId": "[reference('backendUserAssignedIdentity').outputs.principalId.value]", |
| 24354 | + "principalType": "ServicePrincipal" |
24345 | 24355 | } |
24346 | 24356 | ] |
24347 | 24357 | }, |
|
30052 | 30062 | } |
30053 | 30063 | }, |
30054 | 30064 | "dependsOn": [ |
30055 | | - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", |
30056 | | - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", |
30057 | 30065 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]", |
| 30066 | + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", |
| 30067 | + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", |
| 30068 | + "backendUserAssignedIdentity", |
30058 | 30069 | "logAnalyticsWorkspace", |
30059 | 30070 | "userAssignedIdentity", |
30060 | 30071 | "virtualNetwork" |
|
32381 | 32392 | }, |
32382 | 32393 | "dependsOn": [ |
32383 | 32394 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", |
32384 | | - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", |
32385 | 32395 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]", |
| 32396 | + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", |
32386 | 32397 | "logAnalyticsWorkspace", |
32387 | 32398 | "userAssignedIdentity", |
32388 | 32399 | "virtualNetwork" |
|
32448 | 32459 | "principalId": "[reference('userAssignedIdentity').outputs.principalId.value]", |
32449 | 32460 | "principalType": "ServicePrincipal" |
32450 | 32461 | }, |
| 32462 | + { |
| 32463 | + "roleDefinitionIdOrName": "1407120a-92aa-4202-b7e9-c0e197c71c8f", |
| 32464 | + "principalId": "[reference('backendUserAssignedIdentity').outputs.principalId.value]", |
| 32465 | + "principalType": "ServicePrincipal" |
| 32466 | + }, |
32451 | 32467 | { |
32452 | 32468 | "roleDefinitionIdOrName": "1407120a-92aa-4202-b7e9-c0e197c71c8f", |
32453 | 32469 | "principalId": "[if(not(variables('useExistingAiFoundryAiProject')), reference('aiFoundryAiServices').outputs.aiProjectInfo.value.aiprojectSystemAssignedMIPrincipalId, reference('existingAiFoundryAiServicesProject', '2025-04-01-preview', 'full').identity.principalId)]", |
|
34771 | 34787 | "dependsOn": [ |
34772 | 34788 | "aiFoundryAiServices", |
34773 | 34789 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').search)]", |
| 34790 | + "backendUserAssignedIdentity", |
34774 | 34791 | "existingAiFoundryAiServicesProject", |
34775 | 34792 | "logAnalyticsWorkspace", |
34776 | 34793 | "userAssignedIdentity", |
@@ -40746,10 +40763,10 @@ |
40746 | 40763 | } |
40747 | 40764 | }, |
40748 | 40765 | "dependsOn": [ |
40749 | | - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]", |
40750 | 40766 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]", |
40751 | | - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageDfs)]", |
40752 | 40767 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]", |
| 40768 | + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageDfs)]", |
| 40769 | + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]", |
40753 | 40770 | "userAssignedIdentity", |
40754 | 40771 | "virtualNetwork" |
40755 | 40772 | ] |
|
40802 | 40819 | ], |
40803 | 40820 | "assignments": [ |
40804 | 40821 | { |
40805 | | - "principalId": "[reference('userAssignedIdentity').outputs.principalId.value]" |
| 40822 | + "principalId": "[reference('backendUserAssignedIdentity').outputs.principalId.value]" |
40806 | 40823 | } |
40807 | 40824 | ] |
40808 | 40825 | } |
|
44587 | 44604 | }, |
44588 | 44605 | "dependsOn": [ |
44589 | 44606 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cosmosDB)]", |
| 44607 | + "backendUserAssignedIdentity", |
44590 | 44608 | "logAnalyticsWorkspace", |
44591 | 44609 | "storageAccount", |
44592 | | - "userAssignedIdentity", |
44593 | 44610 | "virtualNetwork" |
44594 | 44611 | ] |
44595 | 44612 | }, |
|
44645 | 44662 | "value": { |
44646 | 44663 | "systemAssigned": true, |
44647 | 44664 | "userAssignedResourceIds": [ |
44648 | | - "[reference('userAssignedIdentity').outputs.resourceId.value]" |
| 44665 | + "[reference('userAssignedIdentity').outputs.resourceId.value]", |
| 44666 | + "[reference('backendUserAssignedIdentity').outputs.resourceId.value]" |
44649 | 44667 | ] |
44650 | 44668 | } |
44651 | 44669 | }, |
|
51230 | 51248 | }, |
51231 | 51249 | "dependsOn": [ |
51232 | 51250 | "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').sqlServer)]", |
| 51251 | + "backendUserAssignedIdentity", |
51233 | 51252 | "logAnalyticsWorkspace", |
51234 | 51253 | "userAssignedIdentity", |
51235 | 51254 | "virtualNetwork" |
|
52437 | 52456 | "value": true |
52438 | 52457 | }, |
52439 | 52458 | "arguments": { |
52440 | | - "value": "[join(createArray(format('-SqlServerName ''{0}''', variables('sqlServerResourceName')), format('-SqlDatabaseName ''{0}''', variables('sqlDbModuleName')), format('-ClientId ''{0}''', reference('sqlUserAssignedIdentity').outputs.clientId.value), format('-DisplayName ''{0}''', reference('sqlUserAssignedIdentity').outputs.name.value), format('-DatabaseRoles ''{0}''', join(variables('databaseRoles'), ','))), ' ')]" |
| 52459 | + "value": "[join(createArray(format('-SqlServerName ''{0}''', variables('sqlServerResourceName')), format('-SqlDatabaseName ''{0}''', variables('sqlDbModuleName')), format('-ClientId ''{0}''', reference('backendUserAssignedIdentity').outputs.clientId.value), format('-DisplayName ''{0}''', reference('backendUserAssignedIdentity').outputs.name.value), format('-DatabaseRoles ''{0}''', join(variables('databaseRoles'), ','))), ' ')]" |
52441 | 52460 | }, |
52442 | 52461 | "scriptContent": { |
52443 | 52462 | "value": "[variables('$fxv#0')]" |
|
52985 | 53004 | } |
52986 | 53005 | }, |
52987 | 53006 | "dependsOn": [ |
| 53007 | + "backendUserAssignedIdentity", |
52988 | 53008 | "sqlDBModule", |
52989 | | - "sqlUserAssignedIdentity", |
52990 | 53009 | "storageAccount", |
52991 | 53010 | "userAssignedIdentity", |
52992 | 53011 | "virtualNetwork" |
|
53022 | 53041 | }, |
53023 | 53042 | "diagnosticSettings": "[if(parameters('enableMonitoring'), createObject('value', createArray(createObject('workspaceResourceId', if(variables('useExistingLogAnalytics'), parameters('existingLogAnalyticsWorkspaceId'), reference('logAnalyticsWorkspace').outputs.resourceId.value)))), createObject('value', null()))]", |
53024 | 53043 | "skuName": "[if(or(parameters('enableScalability'), parameters('enableRedundancy')), createObject('value', 'P1v3'), createObject('value', 'B3'))]", |
53025 | | - "skuCapacity": "[if(parameters('enableScalability'), createObject('value', 3), createObject('value', 1))]", |
| 53044 | + "skuCapacity": "[if(parameters('enableScalability'), createObject('value', 1), createObject('value', 1))]", |
53026 | 53045 | "zoneRedundant": "[if(parameters('enableRedundancy'), createObject('value', true()), createObject('value', false()))]" |
53027 | 53046 | }, |
53028 | 53047 | "template": { |
|
53592 | 53611 | "value": { |
53593 | 53612 | "systemAssigned": true, |
53594 | 53613 | "userAssignedResourceIds": [ |
53595 | | - "[reference('userAssignedIdentity').outputs.resourceId.value]" |
| 53614 | + "[reference('backendUserAssignedIdentity').outputs.resourceId.value]" |
53596 | 53615 | ] |
53597 | 53616 | } |
53598 | 53617 | }, |
|
53622 | 53641 | "AZURE_COSMOSDB_ENABLE_FEEDBACK": "True", |
53623 | 53642 | "SQLDB_DATABASE": "[format('sqldb-{0}', variables('solutionSuffix'))]", |
53624 | 53643 | "SQLDB_SERVER": "[format('{0}{1}', reference('sqlDBModule').outputs.name.value, environment().suffixes.sqlServerHostname)]", |
53625 | | - "SQLDB_USER_MID": "[reference('sqlUserAssignedIdentity').outputs.clientId.value]", |
| 53644 | + "SQLDB_USER_MID": "[reference('backendUserAssignedIdentity').outputs.clientId.value]", |
53626 | 53645 | "AZURE_AI_SEARCH_ENDPOINT": "[format('https://{0}.search.windows.net', variables('aiSearchName'))]", |
53627 | 53646 | "AZURE_AI_SEARCH_INDEX": "call_transcripts_index", |
53628 | 53647 | "AZURE_AI_SEARCH_CONNECTION_NAME": "[variables('aiSearchName')]", |
|
53632 | 53651 | "DUMMY_TEST": "True", |
53633 | 53652 | "SOLUTION_NAME": "[variables('solutionSuffix')]", |
53634 | 53653 | "APP_ENV": "Prod", |
53635 | | - "AZURE_CLIENT_ID": "[reference('userAssignedIdentity').outputs.clientId.value]" |
| 53654 | + "AZURE_CLIENT_ID": "[reference('backendUserAssignedIdentity').outputs.clientId.value]", |
| 53655 | + "AZURE_BASIC_LOGGING_LEVEL": "INFO", |
| 53656 | + "AZURE_PACKAGE_LOGGING_LEVEL": "WARNING" |
53636 | 53657 | }, |
53637 | 53658 | "applicationInsightResourceId": "[if(parameters('enableMonitoring'), reference('applicationInsights').outputs.resourceId.value, null())]" |
53638 | 53659 | } |
@@ -55628,11 +55649,10 @@ |
55628 | 55649 | "dependsOn": [ |
55629 | 55650 | "aiFoundryAiServices", |
55630 | 55651 | "applicationInsights", |
| 55652 | + "backendUserAssignedIdentity", |
55631 | 55653 | "cosmosDb", |
55632 | 55654 | "logAnalyticsWorkspace", |
55633 | 55655 | "sqlDBModule", |
55634 | | - "sqlUserAssignedIdentity", |
55635 | | - "userAssignedIdentity", |
55636 | 55656 | "virtualNetwork", |
55637 | 55657 | "webServerFarm" |
55638 | 55658 | ] |
|
57876 | 57896 | "metadata": { |
57877 | 57897 | "description": "Contains SQL database user managed identity client ID." |
57878 | 57898 | }, |
57879 | | - "value": "[reference('sqlUserAssignedIdentity').outputs.clientId.value]" |
| 57899 | + "value": "[reference('backendUserAssignedIdentity').outputs.clientId.value]" |
57880 | 57900 | }, |
57881 | 57901 | "USE_AI_PROJECT_CLIENT": { |
57882 | 57902 | "type": "string", |
|
0 commit comments