@@ -75,15 +75,16 @@ param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags =
7575 app : 'Content Processing Solution Accelerator'
7676 location : resourceGroup ().location
7777}
78- @description ('Optional. Set to true to use local build for container app images, otherwise use container registry images.' )
79- param useLocalBuild bool = false
8078
8179@description ('Optional. Enable scaling for the container apps. Defaults to false.' )
8280param enableScaling bool = false
8381
8482@description ('Optional: Existing Log Analytics Workspace Resource ID' )
8583param existingLogAnalyticsWorkspaceId string = ''
8684
85+ @description ('Use this parameter to use an existing AI project resource ID' )
86+ param existingFoundryProjectResourceId string = ''
87+
8788// ========== Solution Prefix Variable ========== //
8889// @description('Optional. A unique deployment timestamp for solution prefix generation.')
8990// param deploymentTimestamp string = utcNow()
@@ -1035,11 +1036,16 @@ module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.20.0' = {
10351036// }
10361037// }
10371038
1039+
1040+
10381041// // ========== AI Foundry and related resources ========== //
1039- module avmAiServices 'br/public:avm/res/cognitive-services/ account:0.11.0 ' = {
1042+ module avmAiServices 'modules/ account/main.bicep ' = {
10401043 name : format (resourceNameFormatString , 'aisa-' )
10411044 params : {
10421045 name : 'aisa-${solutionPrefix }'
1046+ projectName : 'aifp-${solutionPrefix }'
1047+ projectDescription : 'aifp-${solutionPrefix }'
1048+ existingFoundryProjectResourceId : existingFoundryProjectResourceId
10431049 location : aiDeploymentsLocation
10441050 sku : 'S0'
10451051 allowProjectManagement : true
@@ -1128,14 +1134,14 @@ module avmAiServices 'br/public:avm/res/cognitive-services/account:0.11.0' = {
11281134 }
11291135}
11301136
1131- module project 'modules/ai-foundry-project.bicep' = {
1132- name : format (resourceNameFormatString , 'aifp-' )
1133- params : {
1134- name : 'aifp- -${solutionPrefix }'
1135- location : resourceGroup ().location
1136- aiServicesName : avmAiServices .outputs .name
1137- }
1138- }
1137+ // module project 'modules/ai-foundry-project.bicep' = {
1138+ // name: format(resourceNameFormatString, 'aifp-')
1139+ // params: {
1140+ // name: 'aifp-${solutionPrefix}'
1141+ // location: resourceGroup().location
1142+ // aiServicesName: avmAiServices.outputs.name
1143+ // }
1144+ // }
11391145
11401146// Role Assignment
11411147// module avmAiServices_roleAssignment 'br/public:avm/ptn/authorization/resource-role-assignment:0.1.2' = {
@@ -1284,15 +1290,7 @@ module avmContainerApp 'br/public:avm/res/app/container-app:0.17.0' = {
12841290 environmentResourceId : avmContainerAppEnv .outputs .resourceId
12851291 workloadProfileName : 'Consumption'
12861292 enableTelemetry : enableTelemetry
1287- registries : useLocalBuild == 'localbuild'
1288- ? [
1289- {
1290- server : publicContainerImageEndpoint
1291- identity : avmContainerRegistryReader .outputs .principalId
1292- }
1293- ]
1294- : null
1295-
1293+ registries : null
12961294 managedIdentities : {
12971295 systemAssigned : true
12981296 userAssignedResourceIds : [
@@ -1341,37 +1339,18 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.17.0' = {
13411339 environmentResourceId : avmContainerAppEnv .outputs .resourceId
13421340 workloadProfileName : 'Consumption'
13431341 enableTelemetry : enableTelemetry
1344- registries : useLocalBuild == 'localbuild'
1345- ? [
1346- {
1347- server : avmContainerRegistry .outputs .loginServer
1348- identity : avmContainerRegistryReader .outputs .principalId
1349- }
1350- ]
1351- : null
1352- // registries: useLocalBuild == 'localbuild'
1353- // ? [
1354- // {
1355- // server: publicContainerImageEndpoint
1356- // image: 'contentprocessorapi'
1357- // imageTag: 'latest'
1358- // }
1359- // ]
1360- // : null
1342+ registries : null
13611343 tags : tags
13621344 managedIdentities : {
13631345 systemAssigned : true
13641346 userAssignedResourceIds : [
13651347 avmContainerRegistryReader .outputs .resourceId
13661348 ]
13671349 }
1368-
13691350 containers : [
13701351 {
13711352 name : 'ca-${solutionPrefix }-api'
1372- image : (useLocalBuild != 'localbuild' )
1373- ? '${publicContainerImageEndpoint }/contentprocessorapi:latest'
1374- : avmContainerRegistry .outputs .loginServer
1353+ image : '${publicContainerImageEndpoint }/contentprocessorapi:latest'
13751354 resources : {
13761355 cpu : '4'
13771356 memory : '8.0Gi'
@@ -1468,23 +1447,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.17.0' = {
14681447 environmentResourceId : avmContainerAppEnv .outputs .resourceId
14691448 workloadProfileName : 'Consumption'
14701449 enableTelemetry : enableTelemetry
1471- registries : useLocalBuild == 'localbuild'
1472- ? [
1473- {
1474- server : avmContainerRegistry .outputs .loginServer
1475- identity : avmContainerRegistryReader .outputs .principalId
1476- }
1477- ]
1478- : null
1479- // registries: useLocalBuild == 'localbuild'
1480- // ? [
1481- // {
1482- // server: publicContainerImageEndpoint
1483- // image: 'contentprocessorweb'
1484- // imageTag: 'latest'
1485- // }
1486- // ]
1487- // : null
1450+ registries : null
14881451 tags : tags
14891452 managedIdentities : {
14901453 systemAssigned : true
@@ -1513,9 +1476,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.17.0' = {
15131476 containers : [
15141477 {
15151478 name : 'ca-${solutionPrefix }-web'
1516- image : (useLocalBuild != 'localbuild' )
1517- ? '${publicContainerImageEndpoint }/contentprocessorweb:latest'
1518- : avmContainerRegistry .outputs .loginServer
1479+ image : '${publicContainerImageEndpoint }/contentprocessorweb:latest'
15191480 resources : {
15201481 cpu : '4'
15211482 memory : '8.0Gi'
@@ -1721,7 +1682,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
17211682 }
17221683 {
17231684 name : 'APP_AI_PROJECT_ENDPOINT'
1724- value : project .outputs .projectEndpoint
1685+ value : avmAiServices .outputs .aiProjectInfo . apiEndpoint
17251686 }
17261687 {
17271688 name : 'APP_COSMOS_CONNSTR'
@@ -1757,7 +1718,6 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
17571718 avmAiServices_cu
17581719 avmStorageAccount
17591720 avmCosmosDB
1760- project
17611721 ]
17621722}
17631723
@@ -1836,22 +1796,14 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.17.0' = {
18361796 enableTelemetry : enableTelemetry
18371797 environmentResourceId : avmContainerAppEnv .outputs .resourceId
18381798 workloadProfileName : 'Consumption'
1839- registries : useLocalBuild == 'localbuild'
1840- ? [
1841- {
1842- server : publicContainerImageEndpoint
1843- identity : avmContainerRegistryReader .outputs .principalId
1844- }
1845- ]
1846- : null
1799+ registries : null
18471800 tags : tags
18481801 managedIdentities : {
18491802 systemAssigned : true
18501803 userAssignedResourceIds : [
18511804 avmContainerRegistryReader .outputs .resourceId
18521805 ]
18531806 }
1854-
18551807 containers : [
18561808 {
18571809 name : 'ca-${solutionPrefix }'
@@ -1902,23 +1854,7 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.17.0' =
19021854 enableTelemetry : enableTelemetry
19031855 environmentResourceId : avmContainerAppEnv .outputs .resourceId
19041856 workloadProfileName : 'Consumption'
1905- registries : useLocalBuild == 'localbuild'
1906- ? [
1907- {
1908- server : avmContainerRegistry .outputs .loginServer
1909- identity : avmContainerRegistryReader .outputs .principalId
1910- }
1911- ]
1912- : null
1913- // registries: useLocalBuild == 'localbuild'
1914- // ? [
1915- // {
1916- // server: publicContainerImageEndpoint
1917- // image: 'contentprocessorapi'
1918- // imageTag: 'latest'
1919- // }
1920- // ]
1921- // : null
1857+ registries : null
19221858 tags : tags
19231859 managedIdentities : {
19241860 systemAssigned : true
@@ -1930,9 +1866,7 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.17.0' =
19301866 containers : [
19311867 {
19321868 name : 'ca-${solutionPrefix }-api'
1933- image : (useLocalBuild != 'localbuild' )
1934- ? '${publicContainerImageEndpoint }/contentprocessorapi:latest'
1935- : avmContainerRegistry .outputs .loginServer
1869+ image : '${publicContainerImageEndpoint }/contentprocessorapi:latest'
19361870 resources : {
19371871 cpu : '4'
19381872 memory : '8.0Gi'
0 commit comments