@@ -113,10 +113,10 @@ param enableRedundancy bool = false
113113param enablePrivateNetworking bool = false
114114
115115@description ('Optional. The Container Registry hostname where the docker images are located.' )
116- param acrName string = 'testapwaf ' // byocgacontainerreg
116+ param acrName string = 'byocgacontainerreg ' // testapwaf
117117
118118@description ('Optional. Image Tag.' )
119- param imageTag string = 'waf'
119+ param imageTag string = 'latest' // waf
120120
121121@description ('Optional. Enable/Disable usage telemetry for module.' )
122122param enableTelemetry bool = true
@@ -324,7 +324,7 @@ module logAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0
324324var logAnalyticsWorkspaceResourceId = useExistingLogAnalytics ? existingLogAnalyticsWorkspaceId : logAnalyticsWorkspace !.outputs .resourceId
325325// ========== Application Insights ========== //
326326var applicationInsightsResourceName = 'appi-${solutionSuffix }'
327- module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = if (enableMonitoring && ! useExistingLogAnalytics ) {
327+ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = if (enableMonitoring ) {
328328 name : take ('avm.res.insights.component.${applicationInsightsResourceName }' , 64 )
329329 params : {
330330 name : applicationInsightsResourceName
@@ -336,8 +336,8 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = if (en
336336 disableIpMasking : false
337337 flowType : 'Bluefield'
338338 // WAF aligned configuration for Monitoring
339- workspaceResourceId : enableMonitoring ? logAnalyticsWorkspaceResourceId : ''
340- diagnosticSettings : enableMonitoring ? [{ workspaceResourceId : logAnalyticsWorkspaceResourceId }] : null
339+ workspaceResourceId : logAnalyticsWorkspaceResourceId
340+ diagnosticSettings : [{ workspaceResourceId : logAnalyticsWorkspaceResourceId }]
341341 }
342342}
343343
@@ -1009,7 +1009,7 @@ module webSite 'modules/web-sites.bicep' = {
10091009 linuxFxVersion : 'DOCKER|${acrName }.azurecr.io/webapp:${imageTag }'
10101010 minTlsVersion : '1.2'
10111011 }
1012- configs : [
1012+ configs : concat ( [
10131013 {
10141014 name : 'appsettings'
10151015 properties : {
@@ -1059,7 +1059,13 @@ module webSite 'modules/web-sites.bicep' = {
10591059 // WAF aligned configuration for Monitoring
10601060 applicationInsightResourceId : enableMonitoring ? applicationInsights !.outputs .resourceId : null
10611061 }
1062- ]
1062+ ], enableMonitoring ? [
1063+ {
1064+ name : 'logs'
1065+ properties : {}
1066+ }
1067+ ] : [])
1068+ enableMonitoring : enableMonitoring
10631069 diagnosticSettings : enableMonitoring ? [{ workspaceResourceId : logAnalyticsWorkspaceResourceId }] : null
10641070 // WAF aligned configuration for Private Networking
10651071 vnetRouteAllEnabled : enablePrivateNetworking ? true : false
@@ -1069,32 +1075,6 @@ module webSite 'modules/web-sites.bicep' = {
10691075 }
10701076}
10711077
1072- // ========== App Service Logs Configuration ========== //
1073- resource webSiteLogs 'Microsoft.Web/sites/config@2024-04-01' = if (enableMonitoring ) {
1074- name : '${webSiteResourceName }/logs'
1075- properties : {
1076- applicationLogs : {
1077- fileSystem : {
1078- level : 'Verbose' // Match the current configuration
1079- }
1080- }
1081- httpLogs : {
1082- fileSystem : {
1083- enabled : true
1084- retentionInDays : 3
1085- retentionInMb : 100
1086- }
1087- }
1088- detailedErrorMessages : {
1089- enabled : true
1090- }
1091- failedRequestsTracing : {
1092- enabled : true
1093- }
1094- }
1095- dependsOn : [webSite ]
1096- }
1097-
10981078// ========== Outputs ========== //
10991079@description ('Contains WebApp URL' )
11001080output WEB_APP_URL string = 'https://${webSite .outputs .name }.azurewebsites.net'
0 commit comments