|
5 | 5 | "_generator": { |
6 | 6 | "name": "bicep", |
7 | 7 | "version": "0.33.93.31351", |
8 | | - "templateHash": "234966597453008945" |
| 8 | + "templateHash": "17542743656550028202" |
9 | 9 | } |
10 | 10 | }, |
11 | 11 | "parameters": { |
|
156 | 156 | "type": "SystemAssigned" |
157 | 157 | }, |
158 | 158 | "properties": { |
159 | | - "managedEnvironmentId": "[reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned')))), '2022-09-01').outputs.resourceId.value]", |
| 159 | + "managedEnvironmentId": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned')))), '2022-09-01').outputs.resourceId.value]", |
160 | 160 | "configuration": { |
161 | 161 | "ingress": { |
162 | 162 | "external": true, |
|
175 | 175 | "env": [ |
176 | 176 | { |
177 | 177 | "name": "COSMOSDB_ENDPOINT", |
178 | | - "value": "[reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned')))), '2022-09-01').outputs.endpoint.value]" |
| 178 | + "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned')))), '2022-09-01').outputs.endpoint.value]" |
179 | 179 | }, |
180 | 180 | { |
181 | 181 | "name": "COSMOSDB_DATABASE", |
|
244 | 244 | }, |
245 | 245 | "dependsOn": [ |
246 | 246 | "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry')]", |
247 | | - "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned'))))]", |
248 | | - "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned'))))]", |
| 247 | + "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned'))))]", |
| 248 | + "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned'))))]", |
249 | 249 | "[resourceId('Microsoft.Storage/storageAccounts', variables('storageNameCleanedContainer'))]" |
250 | 250 | ] |
251 | 251 | }, |
|
969 | 969 | "type": "Microsoft.Resources/deployments", |
970 | 970 | "apiVersion": "2022-09-01", |
971 | 971 | "name": "[toLower(format('{0}conAppsEnv', variables('prefixCleaned')))]", |
| 972 | + "resourceGroup": "[resourceGroup().name]", |
972 | 973 | "properties": { |
973 | 974 | "expressionEvaluationOptions": { |
974 | 975 | "scope": "inner" |
|
1588 | 1589 | "type": "Microsoft.Resources/deployments", |
1589 | 1590 | "apiVersion": "2022-09-01", |
1590 | 1591 | "name": "[toLower(format('{0}database', variables('prefixCleaned')))]", |
| 1592 | + "resourceGroup": "[resourceGroup().name]", |
1591 | 1593 | "properties": { |
1592 | 1594 | "expressionEvaluationOptions": { |
1593 | 1595 | "scope": "inner" |
|
5404 | 5406 | "type": "Microsoft.Resources/deployments", |
5405 | 5407 | "apiVersion": "2022-09-01", |
5406 | 5408 | "name": "[toLower(format('{0}containerAppFrontend', variables('prefixCleaned')))]", |
| 5409 | + "resourceGroup": "[resourceGroup().name]", |
5407 | 5410 | "properties": { |
5408 | 5411 | "expressionEvaluationOptions": { |
5409 | 5412 | "scope": "inner" |
|
5449 | 5452 | "value": 1 |
5450 | 5453 | }, |
5451 | 5454 | "environmentResourceId": { |
5452 | | - "value": "[reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned')))), '2022-09-01').outputs.resourceId.value]" |
| 5455 | + "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned')))), '2022-09-01').outputs.resourceId.value]" |
5453 | 5456 | }, |
5454 | 5457 | "name": { |
5455 | 5458 | "value": "[toLower(format('{0}containerFrontend', variables('prefixCleaned')))]" |
|
6625 | 6628 | }, |
6626 | 6629 | "dependsOn": [ |
6627 | 6630 | "[resourceId('Microsoft.App/containerApps', toLower(format('{0}containerBackend', variables('prefixCleaned'))))]", |
6628 | | - "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned'))))]", |
| 6631 | + "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('prefixCleaned'))))]", |
6629 | 6632 | "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity')]" |
6630 | 6633 | ] |
6631 | 6634 | }, |
6632 | 6635 | { |
6633 | 6636 | "type": "Microsoft.Resources/deployments", |
6634 | 6637 | "apiVersion": "2022-09-01", |
6635 | 6638 | "name": "deploymentScriptCLI", |
| 6639 | + "resourceGroup": "[resourceGroup().name]", |
6636 | 6640 | "properties": { |
6637 | 6641 | "expressionEvaluationOptions": { |
6638 | 6642 | "scope": "inner" |
|
6659 | 6663 | } |
6660 | 6664 | }, |
6661 | 6665 | "scriptContent": { |
6662 | | - "value": "[format('az cosmosdb sql role assignment create --resource-group \"{0}\" --account-name \"{1}\" --role-definition-id \"{2}\" --scope \"{3}\" --principal-id \"{4}\"', resourceGroup().name, reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned')))), '2022-09-01').outputs.name.value, resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}database', variables('prefixCleaned')))), '/')[0], split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}database', variables('prefixCleaned')))), '/')[1]), reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned')))), '2022-09-01').outputs.resourceId.value, reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}containerBackend', variables('prefixCleaned')))), '2023-05-01', 'full').identity.principalId)]" |
| 6666 | + "value": "[format('az cosmosdb sql role assignment create --resource-group \"{0}\" --account-name \"{1}\" --role-definition-id \"{2}\" --scope \"{3}\" --principal-id \"{4}\"', resourceGroup().name, reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned')))), '2022-09-01').outputs.name.value, resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}database', variables('prefixCleaned')))), '/')[0], split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}database', variables('prefixCleaned')))), '/')[1]), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned')))), '2022-09-01').outputs.resourceId.value, reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}containerBackend', variables('prefixCleaned')))), '2023-05-01', 'full').identity.principalId)]" |
6663 | 6667 | } |
6664 | 6668 | }, |
6665 | 6669 | "template": { |
|
7189 | 7193 | }, |
7190 | 7194 | "dependsOn": [ |
7191 | 7195 | "[resourceId('Microsoft.App/containerApps', toLower(format('{0}containerBackend', variables('prefixCleaned'))))]", |
7192 | | - "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned'))))]", |
| 7196 | + "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', toLower(format('{0}database', variables('prefixCleaned'))))]", |
7193 | 7197 | "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity')]" |
7194 | 7198 | ] |
7195 | 7199 | } |
|
0 commit comments