Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 62 additions & 33 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ param gptModelVersion string = '2025-11-13'
@description('Optional. Capacity of the GPT deployment: (minimum 10).')
param gptDeploymentCapacity int = 300

@description('Optional. The container registry login server/endpoint for the container images (for example, an Azure Container Registry endpoint).')
param containerRegistryEndpoint string = 'cpscontainerreg.azurecr.io'

@description('Optional. The image tag for the container images.')
param imageTag string = 'latest_v2'

@description('Optional. Enable WAF for the deployment.')
param enablePrivateNetworking bool = false

Expand Down Expand Up @@ -722,11 +716,11 @@ module avmAiServices 'modules/account/aifoundry.bicep' = {
customSubDomainName: 'aif-${solutionSuffix}'
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspace!.outputs.resourceId }] : null
roleAssignments: [
{
principalId: avmManagedIdentity.outputs.principalId
roleDefinitionIdOrName: '8e3af657-a8ff-443c-a75c-2fe8c4bcb635' // Owner role
principalType: 'ServicePrincipal'
}
// {
// principalId: avmManagedIdentity.outputs.principalId
// roleDefinitionIdOrName: '8e3af657-a8ff-443c-a75c-2fe8c4bcb635' // Owner role
// principalType: 'ServicePrincipal'
// }
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
{
principalId: avmContainerApp.outputs.systemAssignedMIPrincipalId!
roleDefinitionIdOrName: 'Cognitive Services OpenAI User'
Expand Down Expand Up @@ -888,19 +882,24 @@ module avmContainerApp 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
managedIdentities: {
systemAssigned: true
userAssignedResourceIds: [
avmContainerRegistryReader.outputs.resourceId
]
}

containers: [
{
name: 'ca-${solutionSuffix}'
image: '${containerRegistryEndpoint}/contentprocessor:${imageTag}'

image: 'mcr.microsoft.com/k8se/quickstart:latest'
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -957,7 +956,12 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -968,7 +972,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}-api'
image: '${containerRegistryEndpoint}/contentprocessorapi:${imageTag}'
image: 'mcr.microsoft.com/k8se/quickstart:latest'
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1079,7 +1083,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
}
}
}

//========== Container App Web ========== //
module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-web.${solutionSuffix}', 64)
Expand All @@ -1089,7 +1093,12 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand Down Expand Up @@ -1119,7 +1128,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}-web'
image: '${containerRegistryEndpoint}/contentprocessorweb:${imageTag}'
image: 'mcr.microsoft.com/k8se/quickstart:latest'
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1162,7 +1171,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
]
}
}

// ========== Container App Workflow ========== //
module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-wkfl.${solutionSuffix}', 64)
Expand All @@ -1172,7 +1181,12 @@ module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -1183,7 +1197,7 @@ module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}-wkfl'
image: '${containerRegistryEndpoint}/contentprocessorworkflow:${imageTag}'
image: 'mcr.microsoft.com/k8se/quickstart:latest'
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1550,7 +1564,12 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
enableTelemetry: enableTelemetry
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -1561,8 +1580,8 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}'
image: '${containerRegistryEndpoint}/contentprocessor:${imageTag}'

image: 'mcr.microsoft.com/k8se/quickstart:latest'
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1623,7 +1642,7 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
cognitiveServicePrivateEndpoint
]
}

module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-api.update.${solutionSuffix}', 64)
params: {
Expand All @@ -1632,19 +1651,24 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' =
enableTelemetry: enableTelemetry
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
userAssignedResourceIds: [
avmContainerRegistryReader.outputs.resourceId
]
}

containers: [
{
name: 'ca-${solutionSuffix}-api'
image: '${containerRegistryEndpoint}/contentprocessorapi:${imageTag}'
image: 'mcr.microsoft.com/k8se/quickstart:latest'
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1758,7 +1782,7 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' =
cognitiveServicePrivateEndpoint
]
}

// ========== Container App Workflow Update ========== //
module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-wkfl.update.${solutionSuffix}', 64)
Expand All @@ -1768,7 +1792,12 @@ module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22
enableTelemetry: enableTelemetry
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -1779,7 +1808,7 @@ module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22
containers: [
{
name: 'ca-${solutionSuffix}-wkfl'
image: '${containerRegistryEndpoint}/contentprocessorworkflow:${imageTag}'
image: 'mcr.microsoft.com/k8se/quickstart:latest'
Comment thread
chaudhariniraj marked this conversation as resolved.
Outdated
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down
Loading