@@ -742,15 +742,7 @@ module aiServices 'modules/ai-foundry/aifoundry.bicep' = {
742742 projectName : 'proj-${solutionSuffix }'
743743 projectDescription : 'proj-${solutionSuffix }'
744744 logAnalyticsWorkspaceResourceId : enableMonitoring ? logAnalyticsWorkspaceResourceId : ''
745- privateNetworking : enablePrivateNetworking
746- ? {
747- virtualNetworkResourceId : virtualNetwork !.outputs .resourceId
748- subnetResourceId : virtualNetwork !.outputs .pepsSubnetResourceId
749- cogServicesPrivateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .cognitiveServices ]!.outputs .resourceId
750- openAIPrivateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .openAI ]!.outputs .resourceId
751- aiServicesPrivateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .aiServices ]!.outputs .resourceId
752- }
753- : null
745+ privateNetworking : null // Private endpoint is handled by the standalone aiFoundryPrivateEndpoint module
754746 existingFoundryProjectResourceId : azureExistingAIProjectResourceId
755747 disableLocalAuth : true //Should be set to true for WAF aligned configuration
756748 customSubDomainName : 'aif-${solutionSuffix }'
@@ -789,6 +781,45 @@ module aiServices 'modules/ai-foundry/aifoundry.bicep' = {
789781 }
790782}
791783
784+ var aiFoundryAiServicesResourceName = 'aif-${solutionSuffix }'
785+ var useExistingAiFoundryAiProject = !empty (azureExistingAIProjectResourceId )
786+
787+ module aiFoundryPrivateEndpoint 'br/public:avm/res/network/private-endpoint:0.8.1' = if (enablePrivateNetworking && !useExistingAiFoundryAiProject ) {
788+ name : take ('pep-${aiFoundryAiServicesResourceName }-deployment' , 64 )
789+ params : {
790+ name : 'pep-${aiFoundryAiServicesResourceName }'
791+ customNetworkInterfaceName : 'nic-${aiFoundryAiServicesResourceName }'
792+ location : location
793+ tags : allTags
794+ privateLinkServiceConnections : [
795+ {
796+ name : 'pep-${aiFoundryAiServicesResourceName }-connection'
797+ properties : {
798+ privateLinkServiceId : aiServices .outputs .resourceId
799+ groupIds : ['account' ]
800+ }
801+ }
802+ ]
803+ privateDnsZoneGroup : {
804+ privateDnsZoneGroupConfigs : [
805+ {
806+ name : 'ai-services-dns-zone-cognitiveservices'
807+ privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .cognitiveServices ]!.outputs .resourceId
808+ }
809+ {
810+ name : 'ai-services-dns-zone-openai'
811+ privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .openAI ]!.outputs .resourceId
812+ }
813+ {
814+ name : 'ai-services-dns-zone-aiservices'
815+ privateDnsZoneResourceId : avmPrivateDnsZones [dnsZoneIndex .aiServices ]!.outputs .resourceId
816+ }
817+ ]
818+ }
819+ subnetResourceId : virtualNetwork !.outputs .pepsSubnetResourceId
820+ }
821+ }
822+
792823var appStorageContainerName = 'appstorage'
793824
794825module storageAccount 'modules/storageAccount.bicep' = {
0 commit comments