@@ -301,6 +301,7 @@ var privateDnsZones = [
301301 'privatelink${environment ().suffixes .sqlServerHostname }'
302302 'privatelink.azurewebsites.net'
303303 'privatelink.search.windows.net'
304+ 'privatelink.dfs.${environment ().suffixes .storage }'
304305]
305306// DNS Zone Index Constants
306307var dnsZoneIndex = {
@@ -320,6 +321,7 @@ var dnsZoneIndex = {
320321 sqlServer : 13
321322 appService : 14
322323 search : 15
324+ storageDfs : 16
323325}
324326@batchSize (5 )
325327module avmPrivateDnsZones 'br/public:avm/res/network/private-dns-zone:0.7.1' = [
@@ -956,6 +958,32 @@ module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.20.0' = {
956958 ]
957959 }
958960 }
961+ {
962+ name : 'pep-file-${solutionSuffix }'
963+ service : 'file'
964+ subnetResourceId : network !.outputs .subnetPrivateEndpointsResourceId
965+ privateDnsZoneGroup : {
966+ privateDnsZoneGroupConfigs : [
967+ {
968+ name : 'storage-dns-zone-group-file'
969+ privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .storageFile ]!.outputs .resourceId
970+ }
971+ ]
972+ }
973+ }
974+ {
975+ name : 'pep-dfs-${solutionSuffix }'
976+ service : 'dfs'
977+ subnetResourceId : network !.outputs .subnetPrivateEndpointsResourceId
978+ privateDnsZoneGroup : {
979+ privateDnsZoneGroupConfigs : [
980+ {
981+ name : 'storage-dns-zone-group-dfs'
982+ privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .storageDfs ]!.outputs .resourceId
983+ }
984+ ]
985+ }
986+ }
959987 ] : []
960988
961989 // ✅ Blob service config (simplified, script-friendly)
@@ -1149,44 +1177,35 @@ module sqlDBModule 'br/public:avm/res/sql/server:0.20.1' = {
11491177
11501178//========== AVM WAF ========== //
11511179//========== Deployment script to upload data ========== //
1152- module uploadFiles 'br/public:avm/res/resources/deployment-script:0.5.1' = if (! enablePrivateNetworking ) {
1180+ module uploadFiles 'br/public:avm/res/resources/deployment-script:0.5.1' = {
11531181 name : 'deploymentScriptForUploadFiles'
11541182 params : {
11551183 kind : 'AzureCLI'
11561184 name : 'copy_demo_Data'
11571185 azCliVersion : '2.52.0'
11581186 cleanupPreference : 'Always'
1159- location : solutionLocation // same as VNet
1187+ location : solutionLocation
11601188 managedIdentities : {
11611189 userAssignedResourceIds : [
11621190 userAssignedIdentity .outputs .resourceId
11631191 ]
11641192 }
11651193 retentionInterval : 'P1D'
11661194 runOnce : true
1167-
1168- // ✅ Script + arguments
11691195 primaryScriptUri : '${baseUrl }infra/scripts/copy_kb_files.sh'
11701196 arguments : '${avmStorageAccount .outputs .name } data ${baseUrl } ${userAssignedIdentity .outputs .clientId }'
1171-
1172- // ✅ Explicit storage account + subnet for private networking
11731197 storageAccountResourceId : avmStorageAccount .outputs .resourceId
1174- // subnetResourceIds: enablePrivateNetworking ? [
1175- // network!.outputs.subnetDeploymentScriptsResourceId
1176- // ] : null
1177-
1198+ subnetResourceIds : enablePrivateNetworking ? [
1199+ network !.outputs .subnetDeploymentScriptsResourceId
1200+ ] : null
11781201 tags : tags
11791202 timeout : 'PT1H'
11801203 }
1181- dependsOn : [
1182- avmStorageAccount
1183- network
1184- ]
11851204}
11861205
11871206//========== AVM WAF ========== //
11881207//========== Deployment script to create index ========== //
1189- module createIndex 'br/public:avm/res/resources/deployment-script:0.5.1' = if (! enablePrivateNetworking ) {
1208+ module createIndex 'br/public:avm/res/resources/deployment-script:0.5.1' = {
11901209 name : 'deploymentScriptForCreateIndex'
11911210 params : {
11921211 // Required parameters
@@ -1207,6 +1226,10 @@ module createIndex 'br/public:avm/res/resources/deployment-script:0.5.1' = if(!e
12071226 timeout : 'PT1H'
12081227 retentionInterval : 'P1D'
12091228 cleanupPreference : 'OnSuccess'
1229+ storageAccountResourceId : avmStorageAccount .outputs .resourceId
1230+ subnetResourceIds : enablePrivateNetworking ? [
1231+ network !.outputs .subnetDeploymentScriptsResourceId
1232+ ] : null
12101233 }
12111234 dependsOn :[sqlDBModule ,uploadFiles ]
12121235}
0 commit comments