Skip to content

Commit 3fe6282

Browse files
Prajwal-MicrosoftPriyanka-MicrosoftRoopan-MicrosoftAbdul-MicrosoftPrasanjeet-Microsoft
authored
fix: Private network issue while reusing foundry project (#243)
* feat: Down merge from main to dev (#240) * updated model capacity to minimum 100 * Add principalType 'ServicePrincipal' to role assignments in Bicep modules * update mainjson file * removed text embedding condition * add reuse guide for existing Azure AI Foundry project * remove redundant replica settings for container and API apps in deployment workflow * disable private networking in deployment parameters * normalize secondary location value to lowercase in deployment parameters * fix: correct casing for SOLUTION_NAME in deployment output extraction * refactor: remove unused SOLUTION_NAME output and related steps in deployment workflow * fix: prepend https to CONTAINER_WEB_APPURL in deployment output extraction --------- Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com> Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com> Co-authored-by: Abdul-Microsoft <v-amujeebta@microsoft.com> Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com> Co-authored-by: Vinay Sharma <v-vinayshar@microsoft.com> * feat: Down merge from main to dev (#241) * updated model capacity to minimum 100 * Add principalType 'ServicePrincipal' to role assignments in Bicep modules * update mainjson file * removed text embedding condition * add reuse guide for existing Azure AI Foundry project * remove redundant replica settings for container and API apps in deployment workflow * disable private networking in deployment parameters * normalize secondary location value to lowercase in deployment parameters * fix: correct casing for SOLUTION_NAME in deployment output extraction * refactor: remove unused SOLUTION_NAME output and related steps in deployment workflow * fix: prepend https to CONTAINER_WEB_APPURL in deployment output extraction --------- Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com> Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com> Co-authored-by: Abdul-Microsoft <v-amujeebta@microsoft.com> Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com> Co-authored-by: Vinay Sharma <v-vinayshar@microsoft.com> * fix: Handling Private network connections with existing foundry projrect (#242) * updated model capacity to minimum 100 * Add principalType 'ServicePrincipal' to role assignments in Bicep modules * update mainjson file * removed text embedding condition * add reuse guide for existing Azure AI Foundry project * remove redundant replica settings for container and API apps in deployment workflow * disable private networking in deployment parameters * normalize secondary location value to lowercase in deployment parameters * fix: correct casing for SOLUTION_NAME in deployment output extraction * refactor: remove unused SOLUTION_NAME output and related steps in deployment workflow * fix: prepend https to CONTAINER_WEB_APPURL in deployment output extraction * fix: Disable Network configurations in case of resuing the foundry project --------- Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com> Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com> Co-authored-by: Abdul-Microsoft <v-amujeebta@microsoft.com> Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com> Co-authored-by: Vinay Sharma <v-vinayshar@microsoft.com> * fix: Resolved conflicts --------- Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com> Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com> Co-authored-by: Abdul-Microsoft <v-amujeebta@microsoft.com> Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com> Co-authored-by: Vinay Sharma <v-vinayshar@microsoft.com>
1 parent 86a1962 commit 3fe6282

2 files changed

Lines changed: 69 additions & 50 deletions

File tree

infra/main.bicep

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ var solutionPrefix = 'cps-${padLeft(take(toLower(uniqueString(subscription().id,
9191
// Resources //
9292
// ============== //
9393

94+
var existingProjectResourceId = trim(existingFoundryProjectResourceId)
95+
9496
// ========== AVM Telemetry ========== //
9597
#disable-next-line no-deployments-resources
9698
resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableTelemetry) {
@@ -579,7 +581,7 @@ module avmAiServices 'modules/account/main.bicep' = {
579581
name: 'aisa-${solutionPrefix}'
580582
projectName: 'aifp-${solutionPrefix}'
581583
projectDescription: 'aifp-${solutionPrefix}'
582-
existingFoundryProjectResourceId: existingFoundryProjectResourceId
584+
existingFoundryProjectResourceId: existingProjectResourceId
583585
location: aiDeploymentsLocation
584586
sku: 'S0'
585587
allowProjectManagement: true
@@ -632,7 +634,7 @@ module avmAiServices 'modules/account/main.bicep' = {
632634
// WAF related parameters
633635
publicNetworkAccess: (enablePrivateNetworking) ? 'Disabled' : 'Enabled'
634636
//publicNetworkAccess: 'Enabled' // Always enabled for AI Services
635-
privateEndpoints: (enablePrivateNetworking)
637+
privateEndpoints: (enablePrivateNetworking && empty(existingProjectResourceId))
636638
? [
637639
{
638640
name: 'ai-services-private-endpoint-${solutionPrefix}'

0 commit comments

Comments
 (0)