@@ -141,9 +141,9 @@ module avmRoleAssignment 'br/public:avm/ptn/authorization/resource-role-assignme
141141module avmKeyVault './modules/key-vault.bicep' = {
142142 name : format (deployment_param .resource_name_format_string , abbrs .security .keyVault )
143143 params : {
144- name : format ( deployment_param . resource_name_format_string , abbrs . security . keyVault )
144+ deployment_param : deployment_param
145145 keyVaultParams : {
146- keyvault_name : '${abbrs .security .keyVault }${deployment_param .solution_prefix }'
146+ keyvaultName : '${abbrs .security .keyVault }${deployment_param .solution_prefix }'
147147 location : deployment_param .resource_group_location
148148 tags : {
149149 app : deployment_param .solution_prefix
@@ -182,41 +182,37 @@ module avmKeyVault './modules/key-vault.bicep' = {
182182// scope: resourceGroup(resourceGroup().name)
183183// }
184184
185- // ========== Application insights ========== //
186- module avmLogAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0.11.2' = {
187- name : format (deployment_param .resource_name_format_string , abbrs .managementGovernance .logAnalyticsWorkspace )
188- params : {
189- name : '${abbrs .managementGovernance .logAnalyticsWorkspace }${deployment_param .solution_prefix }'
190- location : deployment_param .resource_group_location
191- diagnosticSettings : [{ useThisWorkspace : true }]
192- skuName : 'PerGB2018'
193- dataRetention : 30
194- }
195- }
196-
197- module avmApplicationInsights 'br/public:avm/res/insights/component:0.6.0' = {
198- name : format (deployment_param .resource_name_format_string , abbrs .managementGovernance .applicationInsights )
185+ // ========== Application insights and Log Analytics Workspace (AVM module) ========== //
186+ module avmAppInsightsAndLogAnalytics './modules/app-insights.bicep' = {
187+ name : format (deployment_param .resource_name_format_string , 'ai-law-avm' )
199188 params : {
200- name : '${abbrs .managementGovernance .applicationInsights }${deployment_param .solution_prefix }'
201- location : deployment_param .resource_group_location
202- workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
203- retentionInDays : 30
204- kind : 'web'
205- disableIpMasking : false
206- flowType : 'Bluefield'
207- diagnosticSettings : [{ workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId }]
189+ deployment_param : deployment_param
190+ appInsights_param : {
191+ appInsightsName : '${abbrs .managementGovernance .applicationInsights }${deployment_param .solution_prefix }'
192+ logAnalyticsWorkspaceName : '${abbrs .managementGovernance .logAnalyticsWorkspace }${deployment_param .solution_prefix }'
193+ location : deployment_param .resource_group_location
194+ kind : 'web'
195+ retentionInDays : 30
196+ features : {
197+ searchVersion : 1
198+ }
199+ skuName : 'PerGB2018'
200+ applicationType : 'web'
201+ disableIpMasking : false
202+ disableLocalAuth : false
203+ flowType : 'Bluefield'
204+ forceCustomerStorageForProfiler : false
205+ //ImmediatePurgeDataOn30Days: true
206+ //IngestionMode: 'LogAnalytics'
207+ publicNetworkAccessForIngestion : 'Enabled'
208+ publicNetworkAccessForQuery : 'Disabled'
209+ requestSource : 'rest'
210+
211+ }
208212 }
213+ scope : resourceGroup (resourceGroup ().name )
209214}
210215
211- // module applicationInsights 'deploy_app_insights.bicep' = {
212- // name: 'deploy_app_insights'
213- // params: {
214- // applicationInsightsName: '${abbrs.managementGovernance.applicationInsights}${solutionPrefix}'
215- // logAnalyticsWorkspaceName: '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionPrefix}'
216- // }
217- // }
218-
219- // // ========== Container Registry ========== //
220216module avmContainerRegistry 'br/public:avm/res/container-registry/registry:0.9.1' = {
221217 name : format (deployment_param .resource_name_format_string , abbrs .containers .containerRegistry )
222218 params : {
@@ -375,7 +371,7 @@ module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20
375371 allowSharedKeyAccess : false
376372 diagnosticSettings : [
377373 {
378- workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
374+ workspaceResourceId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
379375 }
380376 ]
381377 blobServices : {
@@ -384,7 +380,7 @@ module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20
384380 containerDeleteRetentionPoloicyEnabled : false
385381 diagnosticSettings : [
386382 {
387- workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
383+ workspaceResourceId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
388384 }
389385 ]
390386 }
@@ -416,7 +412,7 @@ module avmAiHub 'br/public:avm/res/machine-learning-services/workspace:0.12.1' =
416412 associatedKeyVaultResourceId : avmKeyVault .outputs .resourceId
417413 associatedStorageAccountResourceId : avmAiServices_storage_hub .outputs .resourceId
418414 associatedContainerRegistryResourceId : avmContainerRegistry .outputs .resourceId
419- associatedApplicationInsightsResourceId : avmApplicationInsights .outputs .resourceId
415+ associatedApplicationInsightsResourceId : avmAppInsightsAndLogAnalytics .outputs .applicationInsightsId
420416
421417 kind : 'Hub'
422418 connections : [
@@ -470,6 +466,18 @@ module avmAiProject 'br/public:avm/res/machine-learning-services/workspace:0.12.
470466// scope: resourceGroup(resourceGroup().name)
471467// }
472468
469+ //TODO: Remove
470+
471+ module avmLogAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0.11.2' = {
472+ name : 'workspaceDeployment'
473+ params : {
474+ // Required parameters
475+ name : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceName
476+ }
477+ scope : resourceGroup (resourceGroup ().name )
478+ }
479+
480+
473481// ========== Container App Environment ========== //
474482module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.1' = {
475483 name : format (deployment_param .resource_name_format_string , abbrs .containers .containerAppsEnvironment )
@@ -484,7 +492,7 @@ module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.1' = {
484492 appLogsConfiguration : {
485493 destination : 'log-analytics'
486494 logAnalyticsConfiguration : {
487- customerId : avmLogAnalyticsWorkspace .outputs .logAnalyticsWorkspaceId
495+ customerId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
488496 sharedKey : avmLogAnalyticsWorkspace .outputs .primarySharedKey
489497 }
490498 }
0 commit comments