@@ -46,6 +46,12 @@ param useVnet bool = false
4646@description ('Flag to enable or disable public ingress' )
4747param usePrivateIngress bool = false
4848
49+ @description ('Flag to restrict ACR public network access (requires VPN for local image push when true)' )
50+ param usePrivateAcr bool = false
51+
52+ @description ('Flag to restrict Log Analytics public query access for increased security' )
53+ param usePrivateLogAnalytics bool = false
54+
4955var resourceToken = toLower (uniqueString (subscription ().id , name , location ))
5056var tags = { 'azd-env-name' : name }
5157
@@ -152,7 +158,7 @@ module logAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0
152158 skuName : 'PerGB2018'
153159 dataRetention : 30
154160 publicNetworkAccessForIngestion : useVnet ? 'Disabled' : 'Enabled'
155- publicNetworkAccessForQuery : 'Enabled' // Keep public query access for debugging - change to 'Disabled' for more security
161+ publicNetworkAccessForQuery : usePrivateLogAnalytics ? 'Disabled' : 'Enabled'
156162 useResourcePermissions : true
157163 }
158164}
@@ -554,7 +560,7 @@ module monitorPrivateLinkScope 'br/public:avm/res/insights/private-link-scope:0.
554560 tags : tags
555561 accessModeSettings : {
556562 ingestionAccessMode : 'PrivateOnly'
557- queryAccessMode : 'Open' // Allow public queries for debugging - change to 'PrivateOnly' for more security
563+ queryAccessMode : usePrivateLogAnalytics ? 'PrivateOnly' : 'Open'
558564 }
559565 scopedResources : [
560566 {
@@ -606,6 +612,7 @@ module containerApps 'core/host/container-apps.bicep' = {
606612 vnetName : useVnet ? virtualNetwork !.outputs .name : ''
607613 subnetName : useVnet ? virtualNetwork !.outputs .subnetNames [0 ] : ''
608614 usePrivateIngress : usePrivateIngress
615+ usePrivateAcr : usePrivateAcr
609616 }
610617}
611618
0 commit comments