@@ -112,6 +112,7 @@ module avmRoleAssignment 'br/public:avm/ptn/authorization/resource-role-assignme
112112 resourceId : avmManagedIdentity .outputs .resourceId
113113 principalId : avmManagedIdentity .outputs .principalId
114114 roleDefinitionId : '8e3af657-a8ff-443c-a75c-2fe8c4bcb635'
115+ principalType : 'ServicePrincipal'
115116 }
116117}
117118
@@ -141,9 +142,9 @@ module avmRoleAssignment 'br/public:avm/ptn/authorization/resource-role-assignme
141142module avmKeyVault './modules/key-vault.bicep' = {
142143 name : format (deployment_param .resource_name_format_string , abbrs .security .keyVault )
143144 params : {
144- deployment_param : deployment_param
145+ name : format ( deployment_param . resource_name_format_string , abbrs . security . keyVault )
145146 keyVaultParams : {
146- keyvaultName : '${abbrs .security .keyVault }${deployment_param .solution_prefix }'
147+ keyvault_name : '${abbrs .security .keyVault }${deployment_param .solution_prefix }'
147148 location : deployment_param .resource_group_location
148149 tags : {
149150 app : deployment_param .solution_prefix
@@ -182,37 +183,41 @@ module avmKeyVault './modules/key-vault.bicep' = {
182183// scope: resourceGroup(resourceGroup().name)
183184// }
184185
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' )
186+ // ========== Application insights ========== //
187+ module avmLogAnalyticsWorkspace 'br/public:avm/res/operational -insights/workspace:0.11.2 ' = {
188+ name : format (deployment_param .resource_name_format_string , abbrs . managementGovernance . logAnalyticsWorkspace )
188189 params : {
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- }
190+ name : '${abbrs .managementGovernance .logAnalyticsWorkspace }${deployment_param .solution_prefix }'
191+ location : deployment_param .resource_group_location
192+ diagnosticSettings : [{ useThisWorkspace : true }]
193+ skuName : 'PerGB2018'
194+ dataRetention : 30
212195 }
213- scope : resourceGroup (resourceGroup ().name )
214196}
215197
198+ module avmApplicationInsights 'br/public:avm/res/insights/component:0.6.0' = {
199+ name : format (deployment_param .resource_name_format_string , abbrs .managementGovernance .applicationInsights )
200+ params : {
201+ name : '${abbrs .managementGovernance .applicationInsights }${deployment_param .solution_prefix }'
202+ location : deployment_param .resource_group_location
203+ workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
204+ retentionInDays : 30
205+ kind : 'web'
206+ disableIpMasking : false
207+ flowType : 'Bluefield'
208+ diagnosticSettings : [{ workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId }]
209+ }
210+ }
211+
212+ // module applicationInsights 'deploy_app_insights.bicep' = {
213+ // name: 'deploy_app_insights'
214+ // params: {
215+ // applicationInsightsName: '${abbrs.managementGovernance.applicationInsights}${solutionPrefix}'
216+ // logAnalyticsWorkspaceName: '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionPrefix}'
217+ // }
218+ // }
219+
220+ // // ========== Container Registry ========== //
216221module avmContainerRegistry 'br/public:avm/res/container-registry/registry:0.9.1' = {
217222 name : format (deployment_param .resource_name_format_string , abbrs .containers .containerRegistry )
218223 params : {
@@ -371,7 +376,7 @@ module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20
371376 allowSharedKeyAccess : false
372377 diagnosticSettings : [
373378 {
374- workspaceResourceId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
379+ workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
375380 }
376381 ]
377382 blobServices : {
@@ -380,7 +385,7 @@ module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20
380385 containerDeleteRetentionPoloicyEnabled : false
381386 diagnosticSettings : [
382387 {
383- workspaceResourceId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
388+ workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
384389 }
385390 ]
386391 }
@@ -412,7 +417,7 @@ module avmAiHub 'br/public:avm/res/machine-learning-services/workspace:0.12.1' =
412417 associatedKeyVaultResourceId : avmKeyVault .outputs .resourceId
413418 associatedStorageAccountResourceId : avmAiServices_storage_hub .outputs .resourceId
414419 associatedContainerRegistryResourceId : avmContainerRegistry .outputs .resourceId
415- associatedApplicationInsightsResourceId : avmAppInsightsAndLogAnalytics .outputs .applicationInsightsId
420+ associatedApplicationInsightsResourceId : avmApplicationInsights .outputs .resourceId
416421
417422 kind : 'Hub'
418423 connections : [
@@ -466,18 +471,6 @@ module avmAiProject 'br/public:avm/res/machine-learning-services/workspace:0.12.
466471// scope: resourceGroup(resourceGroup().name)
467472// }
468473
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-
481474// ========== Container App Environment ========== //
482475module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.1' = {
483476 name : format (deployment_param .resource_name_format_string , abbrs .containers .containerAppsEnvironment )
@@ -492,7 +485,7 @@ module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.1' = {
492485 appLogsConfiguration : {
493486 destination : 'log-analytics'
494487 logAnalyticsConfiguration : {
495- customerId : avmAppInsightsAndLogAnalytics .outputs .logAnalyticsWorkspaceId
488+ customerId : avmLogAnalyticsWorkspace .outputs .logAnalyticsWorkspaceId
496489 sharedKey : avmLogAnalyticsWorkspace .outputs .primarySharedKey
497490 }
498491 }
0 commit comments