@@ -931,8 +931,8 @@ module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.13.2' = {
931931 }
932932 ]
933933 enableTelemetry : enableTelemetry
934- publicNetworkAccess : 'Enabled'
935- internal : false
934+ publicNetworkAccess : enablePrivateNetworking ? 'Disabled' : 'Enabled'
935+ internal : enablePrivateNetworking ? true : false
936936
937937 // <========== WAF related parameters
938938
@@ -945,6 +945,34 @@ module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.13.2' = {
945945 }
946946}
947947
948+ // ========== Private DNS Zone for internal Container App Environment ========== //
949+ // When the CAE is internal, its FQDN is resolvable only within the VNet via this zone.
950+ module caeDnsZone 'br/public:avm/res/network/private-dns-zone:0.8.0' = if (enablePrivateNetworking ) {
951+ name : take ('avm.res.network.private-dns-zone.cae.${solutionSuffix }' , 64 )
952+ params : {
953+ name : avmContainerAppEnv .outputs .defaultDomain
954+ tags : tags
955+ enableTelemetry : enableTelemetry
956+ a : [
957+ {
958+ name : '*'
959+ aRecords : [
960+ {
961+ ipv4Address : avmContainerAppEnv .outputs .staticIp
962+ }
963+ ]
964+ ttl : 300
965+ }
966+ ]
967+ virtualNetworkLinks : [
968+ {
969+ name : take ('vnetlink-vnet-${solutionSuffix }-cae' , 64 )
970+ virtualNetworkResourceId : virtualNetwork !.outputs .resourceId
971+ }
972+ ]
973+ }
974+ }
975+
948976// //=========== Managed Identity for Container Registry ========== //
949977module avmContainerRegistryReader 'br/public:avm/res/managed-identity/user-assigned-identity:0.5.0' = {
950978 name : take ('avm.res.managed-identity.user-assigned-identity.${solutionSuffix }' , 64 )
@@ -1943,8 +1971,5 @@ output CONTAINER_REGISTRY_LOGIN_SERVER string = avmContainerRegistry.outputs.log
19431971@description ('The name of the Content Understanding AI Services account.' )
19441972output CONTENT_UNDERSTANDING_ACCOUNT_NAME string = avmAiServices_cu .outputs .name
19451973
1946- @description ('Whether private networking (WAF) is enabled.' )
1947- output ENABLE_PRIVATE_NETWORKING bool = enablePrivateNetworking
1948-
19491974@description ('The resource group the resources were deployed into.' )
19501975output AZURE_RESOURCE_GROUP string = resourceGroup ().name
0 commit comments