@@ -146,7 +146,7 @@ resource nsgAppGw 'Microsoft.Network/networkSecurityGroups@2024-05-01' = {
146146 sourceAddressPrefix : 'AzureLoadBalancer'
147147 destinationAddressPrefix : '*'
148148 access : 'Allow'
149- priority : 130
149+ priority : 120
150150 direction : 'Inbound'
151151 }
152152 }
@@ -221,10 +221,10 @@ module vnetModule '../../shared/bicep/modules/vnet/v1/vnet.bicep' = {
221221 }
222222}
223223
224- var apimSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${apimSubnetName }'
225- var acaSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${acaSubnetName }'
226- var appgwSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${appgwSubnetName }'
227- var privateEndpointSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${privateEndpointSubnetName }'
224+ var apimSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${apimSubnetName }'
225+ var acaSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${acaSubnetName }'
226+ var appgwSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${appgwSubnetName }'
227+ var peSubnetResourceId = '${vnetModule .outputs .vnetId }/subnets/${privateEndpointSubnetName }'
228228
229229// 4. User Assigned Managed Identity
230230// https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/managed-identity/user-assigned-identity
@@ -340,6 +340,7 @@ module acaModule2 '../../shared/bicep/modules/aca/v1/containerapp.bicep' = if (u
340340module apimModule '../../shared/bicep/modules/apim/v1/apim.bicep' = {
341341 name : 'apimModule'
342342 params : {
343+ apimName : apimName
343344 apimSku : apimSku
344345 appInsightsInstrumentationKey : appInsightsInstrumentationKey
345346 appInsightsId : appInsightsId
@@ -421,11 +422,13 @@ module apisModule '../../shared/bicep/modules/apim/v1/api.bicep' = [for api in a
421422 appInsightsId : appInsightsId
422423 api : api
423424 }
424- dependsOn : [
425+ dependsOn : useACA ? [
425426 apimModule
426427 backendModule1
427428 backendModule2
428429 backendPoolModule
430+ ] : [
431+ apimModule
429432 ]
430433}]
431434
@@ -436,7 +439,7 @@ resource apimPrivateEndpoint 'Microsoft.Network/privateEndpoints@2024-05-01' = {
436439 location : location
437440 properties : {
438441 subnet : {
439- id : privateEndpointSubnetResourceId
442+ id : peSubnetResourceId
440443 }
441444 privateLinkServiceConnections : [
442445 {
@@ -476,7 +479,7 @@ module apimDnsPrivateLinkModule '../../shared/bicep/modules/dns/v1/dns-private-l
476479 dnsZoneName : 'privatelink.azure-api.net'
477480 vnetId : vnetModule .outputs .vnetId
478481 vnetLinkName : 'link-apim'
479- enableDnsZoneGroup : true
482+ enableDnsZoneGroup : false
480483 dnsZoneGroupName : 'dnsZoneGroup-apim'
481484 dnsZoneConfigName : 'config-apim'
482485 }
@@ -553,7 +556,7 @@ module appgwModule 'br/public:avm/res/network/application-gateway:0.7.2' = {
553556 properties : {
554557 backendAddresses : [
555558 {
556- fqdn : replace ( apimModule . outputs . gatewayUrl , 'https://' , '' )
559+ fqdn : '${ apimName }.azure-api.net'
557560 }
558561 ]
559562 }
@@ -624,9 +627,6 @@ module appgwModule 'br/public:avm/res/network/application-gateway:0.7.2' = {
624627 }
625628 ]
626629 }
627- dependsOn : [
628- apimPrivateDnsZoneGroup
629- ]
630630}
631631
632632
0 commit comments