Skip to content

Commit b566ffa

Browse files
Private Connection should get used only for deployment which is creating AI Foundry
1 parent 72f412e commit b566ffa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

infra/main.bicep

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -740,13 +740,13 @@ module aiFoundryAiServices 'modules/account/main.bicep' = if (aiFoundryAIservice
740740
bypass: 'AzureServices'
741741
defaultAction: (virtualNetworkEnabled) ? 'Deny' : 'Allow'
742742
}
743-
744-
745-
privateEndpoints: virtualNetworkEnabled
743+
744+
745+
privateEndpoints: virtualNetworkEnabled && !useExistingFoundryProject
746746
? ([
747747
{
748-
name: 'pep-${aiFoundryAiServicesConfiguration.?name ?? 'aisa-${solutionPrefix}'}'
749-
customNetworkInterfaceName: 'nic-${aiFoundryAiServicesConfiguration.?name ?? 'aisa-${solutionPrefix}'}'
748+
name: 'pep-${aiFoundryAiServicesResourceName}'
749+
customNetworkInterfaceName: 'nic-${aiFoundryAiServicesResourceName}'
750750
subnetResourceId: aiFoundryAiServicesConfiguration.?subnetResourceId ?? virtualNetwork.outputs.subnetResourceIds[0]
751751
privateDnsZoneGroup: {
752752
privateDnsZoneGroupConfigs: map(objectKeys(openAiPrivateDnsZones), zone => {
@@ -756,7 +756,7 @@ module aiFoundryAiServices 'modules/account/main.bicep' = if (aiFoundryAIservice
756756
}
757757
}
758758
])
759-
: []
759+
: []
760760
deployments: aiFoundryAiServicesConfiguration.?deployments ?? [
761761
{
762762
name: aiFoundryAiServicesModelDeployment.name

0 commit comments

Comments
 (0)