diff --git a/infra/main.bicep b/infra/main.bicep index 03b82744..36625dc2 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -417,6 +417,16 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = { } } +// ========== Resource Group Tag ========== // +resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { + name: 'default' + properties: { + tags: { + TemplateName: 'Content Processing' + } + } +} + // ========== Managed Identity ========== // module avmManagedIdentity './modules/managed-identity.bicep' = { params: { diff --git a/infra/main.json b/infra/main.json index 9aa23159..bd2c8a0f 100644 --- a/infra/main.json +++ b/infra/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "961802883849358046" + "version": "0.36.177.2456", + "templateHash": "5192359171136519746" }, "name": "Content Processing Solution Accelerator", "description": "Bicep template to deploy the Content Processing Solution Accelerator with AVM compliance." @@ -219,6 +219,16 @@ } } }, + "resourceGroupTags": { + "type": "Microsoft.Resources/tags", + "apiVersion": "2021-04-01", + "name": "default", + "properties": { + "tags": { + "TemplateName": "Content Processing" + } + } + }, "avmNetworkSecurityGroup": { "condition": "[parameters('enablePrivateNetworking')]", "type": "Microsoft.Resources/deployments", @@ -245,7 +255,7 @@ "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" } ] }, @@ -925,7 +935,7 @@ "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" } ] }, @@ -1670,7 +1680,7 @@ "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" } ] }, @@ -2350,7 +2360,7 @@ "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" } ] }, @@ -3035,7 +3045,7 @@ "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" } ] }, @@ -7898,8 +7908,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "15981152896828585106" + "version": "0.36.177.2456", + "templateHash": "3906046175102371285" } }, "parameters": { @@ -11014,15 +11024,15 @@ "outputs": { "resourceId": { "type": "string", - "value": "[if(variables('useExistingWorkspace'), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('existingLawSubscription'), variables('existingLawResourceGroup')), 'Microsoft.OperationalInsights/workspaces', variables('existingLawName')), listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_new_log_analytics_workspace'), '2022-09-01').resourceId)]" + "value": "[if(variables('useExistingWorkspace'), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('existingLawSubscription'), variables('existingLawResourceGroup')), 'Microsoft.OperationalInsights/workspaces', variables('existingLawName')), reference('logAnalyticsWorkspace').outputs.resourceId.value)]" }, "logAnalyticsWorkspaceId": { "type": "string", - "value": "[if(variables('useExistingWorkspace'), reference('existingLogAnalyticsWorkspace').customerId, listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_new_log_analytics_workspace'), '2022-09-01').logAnalyticsWorkspaceId)]" + "value": "[if(variables('useExistingWorkspace'), reference('existingLogAnalyticsWorkspace').customerId, reference('logAnalyticsWorkspace').outputs.logAnalyticsWorkspaceId.value)]" }, "primarySharedKey": { "type": "securestring", - "value": "[if(variables('useExistingWorkspace'), if(variables('useExistingWorkspace'), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('existingLawSubscription'), variables('existingLawResourceGroup')), 'Microsoft.OperationalInsights/workspaces', variables('existingLawName')), '2020-08-01'), listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_new_log_analytics_workspace'), '2022-09-01').primarySharedKey).primarySharedKey, listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_new_log_analytics_workspace'), '2022-09-01').primarySharedKey)]" + "value": "[if(variables('useExistingWorkspace'), if(variables('useExistingWorkspace'), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('existingLawSubscription'), variables('existingLawResourceGroup')), 'Microsoft.OperationalInsights/workspaces', variables('existingLawName')), '2020-08-01'), listOutputsWithSecureValues('logAnalyticsWorkspace', '2022-09-01').primarySharedKey).primarySharedKey, listOutputsWithSecureValues('logAnalyticsWorkspace', '2022-09-01').primarySharedKey)]" } } } @@ -11045,12 +11055,12 @@ "value": "[parameters('location')]" }, "workspaceResourceId": { - "value": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "value": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" }, "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" } ] }, @@ -11783,8 +11793,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "2317259662067975763" + "version": "0.36.177.2456", + "templateHash": "14410385321137128263" } }, "parameters": { @@ -12358,7 +12368,7 @@ }, "publicNetworkAccess": "[if(parameters('enablePrivateNetworking'), createObject('value', 'Disabled'), createObject('value', 'Enabled'))]", "logAnalyticsWorkspaceResourceId": { - "value": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "value": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" }, "networkAcls": { "value": { @@ -12373,8 +12383,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "12497992766525707634" + "version": "0.36.177.2456", + "templateHash": "12745773382509549839" }, "name": "Key Vault Module" }, @@ -15912,8 +15922,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "11910096117865508081" + "version": "0.36.177.2456", + "templateHash": "11092248228709008584" }, "name": "Container Registry Module" }, @@ -24942,7 +24952,7 @@ "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]" + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]" } ] }, @@ -24998,8 +25008,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "16330577693396165210" + "version": "0.36.177.2456", + "templateHash": "5761548449731819585" }, "name": "Cognitive Services", "description": "This module deploys a Cognitive Service." @@ -26248,8 +26258,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "4128376395637895528" + "version": "0.36.177.2456", + "templateHash": "11270933172961789567" } }, "definitions": { @@ -28057,8 +28067,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "1200612323329026557" + "version": "0.36.177.2456", + "templateHash": "9150529619101779014" } }, "definitions": { @@ -28211,8 +28221,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "125568697111155565" + "version": "0.36.177.2456", + "templateHash": "18131656256983910282" } }, "definitions": { @@ -28429,8 +28439,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "4128376395637895528" + "version": "0.36.177.2456", + "templateHash": "11270933172961789567" } }, "definitions": { @@ -30238,8 +30248,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "1200612323329026557" + "version": "0.36.177.2456", + "templateHash": "9150529619101779014" } }, "definitions": { @@ -30392,8 +30402,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.36.1.42791", - "templateHash": "125568697111155565" + "version": "0.36.177.2456", + "templateHash": "18131656256983910282" } }, "definitions": { @@ -30633,10 +30643,10 @@ "dependsOn": [ "avmContainerApp", "avmManagedIdentity", + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').contentUnderstanding)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]", "avmVirtualNetwork", "logAnalyticsWorkspace" ] @@ -32974,8 +32984,8 @@ "dependsOn": [ "avmContainerApp", "avmManagedIdentity", - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').contentUnderstanding)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').contentUnderstanding)]", "avmVirtualNetwork" ] }, @@ -33010,8 +33020,8 @@ "value": { "destination": "log-analytics", "logAnalyticsConfiguration": { - "customerId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').logAnalyticsWorkspaceId]", - "sharedKey": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').primarySharedKey]" + "customerId": "[reference('logAnalyticsWorkspace').outputs.logAnalyticsWorkspaceId.value]", + "sharedKey": "[listOutputsWithSecureValues('logAnalyticsWorkspace', '2022-09-01').primarySharedKey]" } } }, @@ -42891,7 +42901,7 @@ "diagnosticSettings": { "value": [ { - "workspaceResourceId": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', 'deploy_log_analytics_workspace'), '2022-09-01').resourceId]", + "workspaceResourceId": "[reference('logAnalyticsWorkspace').outputs.resourceId.value]", "logCategoriesAndGroups": [ { "categoryGroup": "allLogs", @@ -42989,11 +42999,11 @@ }, { "name": "APP_STORAGE_BLOB_URL", - "value": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', format(parameters('resourceNameFormatString'), 'st')), '2022-09-01').serviceEndpoints.blob]" + "value": "[reference('avmStorageAccount').outputs.serviceEndpoints.value.blob]" }, { "name": "APP_STORAGE_QUEUE_URL", - "value": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', format(parameters('resourceNameFormatString'), 'st')), '2022-09-01').serviceEndpoints.queue]" + "value": "[reference('avmStorageAccount').outputs.serviceEndpoints.value.queue]" }, { "name": "APP_AI_PROJECT_ENDPOINT", @@ -43001,7 +43011,7 @@ }, { "name": "APP_COSMOS_CONNSTR", - "value": "[listOutputsWithSecureValues(resourceId('Microsoft.Resources/deployments', format(parameters('resourceNameFormatString'), 'cosmos-')), '2022-09-01').primaryReadWriteConnectionString]" + "value": "[listOutputsWithSecureValues('avmCosmosDB', '2022-09-01').primaryReadWriteConnectionString]" } ] },