@@ -131,6 +131,7 @@ module bicepOwnerRoleAssignment 'modules/role_assignment.bicep' = {
131131module avmKeyVault './modules/key-vault.bicep' = {
132132 name : format (deployment_param .resource_name_format_string , abbrs .security .keyVault )
133133 params : {
134+ deployment_param : deployment_param
134135 keyVaultParams : {
135136 keyvaultName : '${abbrs .security .keyVault }${deployment_param .solution_prefix }'
136137 location : deployment_param .resource_group_location
@@ -171,41 +172,37 @@ module avmKeyVault './modules/key-vault.bicep' = {
171172// scope: resourceGroup(resourceGroup().name)
172173// }
173174
174- // ========== Application insights ========== //
175- module avmLogAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0.11.2' = {
176- name : format (deployment_param .resource_name_format_string , abbrs .managementGovernance .logAnalyticsWorkspace )
177- params : {
178- name : '${abbrs .managementGovernance .logAnalyticsWorkspace }${deployment_param .solution_prefix }'
179- location : deployment_param .resource_group_location
180- diagnosticSettings : [{ useThisWorkspace : true }]
181- skuName : 'PerGB2018'
182- dataRetention : 30
183- }
184- }
185-
186- module avmApplicationInsights 'br/public:avm/res/insights/component:0.6.0' = {
187- name : format (deployment_param .resource_name_format_string , abbrs .managementGovernance .applicationInsights )
175+ // ========== Application insights and Log Analytics Workspace (AVM module) ========== //
176+ module avmAppInsightsAndLogAnalytics './modules/app-insights.bicep' = {
177+ name : format (deployment_param .resource_name_format_string , 'ai-law-avm' )
188178 params : {
189- name : '${abbrs .managementGovernance .applicationInsights }${deployment_param .solution_prefix }'
190- location : deployment_param .resource_group_location
191- workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
192- retentionInDays : 30
193- kind : 'web'
194- disableIpMasking : false
195- flowType : 'Bluefield'
196- diagnosticSettings : [{ workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId }]
179+ deployment_param : deployment_param
180+ appInsights_param : {
181+ appInsightsName : '${abbrs .managementGovernance .applicationInsights }${deployment_param .solution_prefix }'
182+ logAnalyticsWorkspaceName : '${abbrs .managementGovernance .logAnalyticsWorkspace }${deployment_param .solution_prefix }'
183+ location : deployment_param .resource_group_location
184+ kind : 'web'
185+ retentionInDays : 30
186+ features : {
187+ searchVersion : 1
188+ }
189+ skuName : 'PerGB2018'
190+ applicationType : 'web'
191+ disableIpMasking : false
192+ disableLocalAuth : false
193+ flowType : 'Bluefield'
194+ forceCustomerStorageForProfiler : false
195+ //ImmediatePurgeDataOn30Days: true
196+ //IngestionMode: 'LogAnalytics'
197+ publicNetworkAccessForIngestion : 'Enabled'
198+ publicNetworkAccessForQuery : 'Disabled'
199+ requestSource : 'rest'
200+
201+ }
197202 }
203+ scope : resourceGroup (resourceGroup ().name )
198204}
199205
200- // module applicationInsights 'deploy_app_insights.bicep' = {
201- // name: 'deploy_app_insights'
202- // params: {
203- // applicationInsightsName: '${abbrs.managementGovernance.applicationInsights}${solutionPrefix}'
204- // logAnalyticsWorkspaceName: '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionPrefix}'
205- // }
206- // }
207-
208- // // ========== Container Registry ========== //
209206module avmContainerRegistry 'br/public:avm/res/container-registry/registry:0.9.1' = {
210207 name : format (deployment_param .resource_name_format_string , abbrs .containers .containerRegistry )
211208 params : {
@@ -364,7 +361,7 @@ module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20
364361 allowSharedKeyAccess : false
365362 diagnosticSettings : [
366363 {
367- workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
364+ workspaceResourceId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
368365 }
369366 ]
370367 blobServices : {
@@ -373,7 +370,7 @@ module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20
373370 containerDeleteRetentionPoloicyEnabled : false
374371 diagnosticSettings : [
375372 {
376- workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
373+ workspaceResourceId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
377374 }
378375 ]
379376 }
@@ -405,7 +402,7 @@ module avmAiHub 'br/public:avm/res/machine-learning-services/workspace:0.12.1' =
405402 associatedKeyVaultResourceId : avmKeyVault .outputs .resourceId
406403 associatedStorageAccountResourceId : avmAiServices_storage_hub .outputs .resourceId
407404 associatedContainerRegistryResourceId : avmContainerRegistry .outputs .resourceId
408- associatedApplicationInsightsResourceId : avmApplicationInsights .outputs .resourceId
405+ associatedApplicationInsightsResourceId : avmAppInsightsAndLogAnalytics .outputs .applicationInsightsId
409406
410407 kind : 'Hub'
411408 connections : [
@@ -459,6 +456,18 @@ module avmAiProject 'br/public:avm/res/machine-learning-services/workspace:0.12.
459456// scope: resourceGroup(resourceGroup().name)
460457// }
461458
459+ //TODO: Remove
460+
461+ module avmLogAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0.11.2' = {
462+ name : 'workspaceDeployment'
463+ params : {
464+ // Required parameters
465+ name : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceName
466+ }
467+ scope : resourceGroup (resourceGroup ().name )
468+ }
469+
470+
462471// ========== Container App Environment ========== //
463472module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.1' = {
464473 name : format (deployment_param .resource_name_format_string , abbrs .containers .containerAppsEnvironment )
@@ -473,7 +482,7 @@ module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.1' = {
473482 appLogsConfiguration : {
474483 destination : 'log-analytics'
475484 logAnalyticsConfiguration : {
476- customerId : avmLogAnalyticsWorkspace .outputs .logAnalyticsWorkspaceId
485+ customerId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
477486 sharedKey : avmLogAnalyticsWorkspace .outputs .primarySharedKey
478487 }
479488 }
0 commit comments