Skip to content

Commit 20ec1ce

Browse files
Merge pull request #383 from microsoft/dev
fix: merging from dev to main
2 parents c7b7fb0 + 858077e commit 20ec1ce

9 files changed

Lines changed: 3160 additions & 310 deletions

File tree

azure.yaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
name: modernize-your-code-solution-accelerator
2-
metadata:
3-
template: modernize-your-code-solution-accelerator@1.0
4-
5-
requiredVersions:
6-
azd: '>= 1.18.0'
7-
8-
parameters:
9-
AzureAiServiceLocation:
10-
type: string
11-
default: japaneast
12-
Prefix:
13-
type: string
14-
default: azdtemp
15-
baseUrl:
16-
type: string
17-
default: 'https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator'
18-
deployment:
19-
mode: Incremental
20-
template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder
21-
parameters:
22-
AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }}
23-
Prefix: ${{ parameters.Prefix }}
24-
baseUrl: ${{ parameters.baseUrl }}
1+
name: modernize-your-code-solution-accelerator
2+
metadata:
3+
template: modernize-your-code-solution-accelerator@1.0
4+
5+
requiredVersions:
6+
azd: '>= 1.18.0 != 1.23.9'
7+
8+
parameters:
9+
AzureAiServiceLocation:
10+
type: string
11+
default: japaneast
12+
Prefix:
13+
type: string
14+
default: azdtemp
15+
baseUrl:
16+
type: string
17+
default: 'https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator'
18+
deployment:
19+
mode: Incremental
20+
template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder
21+
parameters:
22+
AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }}
23+
Prefix: ${{ parameters.Prefix }}
24+
baseUrl: ${{ parameters.baseUrl }}

azure_custom.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
name: modernize-your-code-solution-accelerator
2-
metadata:
3-
template: modernize-your-code-solution-accelerator@1.0
4-
5-
requiredVersions:
6-
azd: '>= 1.18.0'
7-
8-
parameters:
9-
azureAiServiceLocation:
10-
type: string
11-
default: japaneast
12-
13-
services:
14-
backend:
15-
project: ./src/backend
16-
host: containerapp
17-
language: python
18-
docker:
19-
path: Dockerfile
20-
remoteBuild: true
21-
frontend:
22-
project: ./src/frontend
23-
host: containerapp
24-
language: js
25-
docker:
26-
path: Dockerfile
27-
remoteBuild: true
28-
29-
infra:
30-
provider: bicep
31-
path: infra
1+
name: modernize-your-code-solution-accelerator
2+
metadata:
3+
template: modernize-your-code-solution-accelerator@1.0
4+
5+
requiredVersions:
6+
azd: '>= 1.18.0 != 1.23.9'
7+
8+
parameters:
9+
azureAiServiceLocation:
10+
type: string
11+
default: japaneast
12+
13+
services:
14+
backend:
15+
project: ./src/backend
16+
host: containerapp
17+
language: python
18+
docker:
19+
path: Dockerfile
20+
remoteBuild: true
21+
frontend:
22+
project: ./src/frontend
23+
host: containerapp
24+
language: js
25+
docker:
26+
path: Dockerfile
27+
remoteBuild: true
28+
29+
infra:
30+
provider: bicep
31+
path: infra

infra/main.bicep

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
792823
var appStorageContainerName = 'appstorage'
793824

794825
module storageAccount 'modules/storageAccount.bicep' = {

0 commit comments

Comments
 (0)