Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e2dd7b0
New version following agreed standards and compliant with AVM WAF con…
alguadam Aug 6, 2025
0e97262
Refactor Azure credential retrieval to use AZURE_CLIENT_ID across mul…
Abdul-Microsoft Aug 11, 2025
9d6ecbd
Refactor Cosmos DB role definitions and assignments for clarity and c…
Abdul-Microsoft Aug 12, 2025
240f5cf
Merge all the changes from main
Abdul-Microsoft Aug 13, 2025
a99914c
Fix the user assigned identity issue and added quota check, removed h…
Abdul-Microsoft Aug 13, 2025
422c8fb
Added more parameters
Abdul-Microsoft Aug 13, 2025
7a0b86b
Fixes for the command shared by Alvaro
Abdul-Microsoft Aug 14, 2025
7290f29
Merge pull request #379 from microsoft/psl-avmwafchanges
Abdul-Microsoft Aug 14, 2025
b42f0fd
Refactor private DNS zone configurations
Abdul-Microsoft Aug 19, 2025
8ee525d
Added changes to reuse the existing log analytics
Abdul-Microsoft Aug 20, 2025
68ef958
Added bicep changes related to reuse existing foundry project
Abdul-Microsoft Aug 21, 2025
b30dc15
restricting dns zone creation based on reuse existing foundry project
Abdul-Microsoft Aug 21, 2025
e2b5e13
Refactor AI project module: consolidate parameters and outputs for be…
alguadam Aug 22, 2025
e305238
Refactor AI project output structure and remove unused modules
alguadam Aug 25, 2025
169a654
Refactor AI services module: remove deprecated deployments module and…
alguadam Aug 25, 2025
efcf54f
Refactor AI project parameters: rename existing AI Foundry resource I…
alguadam Aug 25, 2025
53107c9
Update .gitignore: add patterns to ignore Bicep and ARM local paramet…
alguadam Aug 26, 2025
c6d5947
Refactor AI Foundry AI Services module: remove commented-out code and…
alguadam Aug 26, 2025
e16ac5f
Refactor AI services module: update aiServicesName assignment to hand…
alguadam Aug 26, 2025
b9b8f24
Refactor AI Foundry AI Services module: add comment for implicit depe…
alguadam Aug 26, 2025
f3f30f7
Refactor AI Foundry AI Services module: simplify aiServicesName assig…
alguadam Aug 26, 2025
072d611
Refactor AI Foundry AI Services module: streamline resource group and…
alguadam Aug 26, 2025
70cc0e7
Refactor parameter files: rename existingFoundryProjectResourceId to …
Abdul-Microsoft Aug 26, 2025
d3a313c
Merge pull request #395 from microsoft/psl-avmwfchanges-alguadam
Roopan-Microsoft Aug 26, 2025
347c79d
Merge pull request #391 from microsoft/psl-avmwafchanges
alguadam Aug 26, 2025
16a7542
Merge branch 'dev' into infra-avm-waf
Roopan-Microsoft Sep 1, 2025
5532fb1
bicep udpated post downmerge
Roopan-Microsoft Sep 1, 2025
16a3ea8
always enable public network access for Container App Environment and…
Abdul-Microsoft Sep 1, 2025
8b7b2b8
Remove unused private endpoint configurations and ensure public netwo…
Abdul-Microsoft Sep 1, 2025
557f57d
Update AZURE_OPENAI_ENDPOINT
Abdul-Microsoft Sep 1, 2025
a2f76b0
fixed the unit test case issue in test_cosmos_memory.py
Abdul-Microsoft Sep 2, 2025
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
14 changes: 8 additions & 6 deletions .github/workflows/deploy-waf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ jobs:
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
--template-file infra/main.bicep \
--parameters \
environmentName=${{ env.SOLUTION_PREFIX }} \
useWafAlignedArchitecture=true \
aiDeploymentsLocation='${{ env.AZURE_LOCATION }}' \
solutionName=${{ env.SOLUTION_PREFIX }} \
location="${{ env.AZURE_LOCATION }}" \
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
gptModelCapacity=5 \
virtualMachineConfiguration='{"adminUsername": "adminuser", "adminPassword": "P@ssw0rd1234"}' \
logAnalyticsWorkspaceConfiguration='{"existingWorkspaceResourceId": ""}'

enableTelemetry=true \
enableMonitoring=true \
enablePrivateNetworking=true \
enableScalability=true \


- name: Send Notification on Failure
if: failure()
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,14 @@ jobs:
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
--template-file infra/main.bicep \
--parameters \
environmentName=${{ env.SOLUTION_PREFIX }} \
solutionLocation="${{ env.AZURE_LOCATION }}" \
modelDeploymentType="GlobalStandard" \
solutionName=${{ env.SOLUTION_PREFIX }} \
location="${{ env.AZURE_LOCATION }}" \
gptModelDeploymentType="GlobalStandard" \
gptModelName="gpt-4o" \
gptModelVersion="2024-08-06" \
imageTag="${IMAGE_TAG}" \
useWafAlignedArchitecture=false \
aiDeploymentsLocation='${{ env.AZURE_LOCATION }}' \
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
gptModelCapacity=150 \
logAnalyticsWorkspaceConfiguration='{"dataRetentionInDays": 30, "existingWorkspaceResourceId": ""}' \
applicationInsightsConfiguration='{"retentionInDays": 30}' \
virtualNetworkConfiguration='{"enabled": false}' \
webServerFarmConfiguration='{"skuCapacity": 1, "skuName": "B2"}' \
--output json

- name: Extract Web App and API App URLs
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,7 @@ __pycache__/
*.whl
.azure
.github/copilot-instructions.md

# Bicep local files
*.local*.bicepparam
*.local*.parameters.json
2,158 changes: 961 additions & 1,197 deletions infra/main.bicep

Large diffs are not rendered by default.

136 changes: 38 additions & 98 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
@@ -1,102 +1,42 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"aiModelDeployments": {
"value": [
{
"name": "gpt",
"model": {
"name": "gpt-4o",
"version": "2024-08-06",
"format": "OpenAI"
},
"sku": {
"name": "GlobalStandard",
"capacity": 140
}
}
]
},
"environmentName": {
"value": "${AZURE_ENV_NAME}"
},
"solutionLocation": {
"value": "${AZURE_LOCATION}"
},
"aiDeploymentsLocation": {
"value": "${AZURE_ENV_OPENAI_LOCATION}"
},
"modelDeploymentType": {
"value": "${AZURE_ENV_MODEL_DEPLOYMENT_TYPE}"
},
"gptModelName": {
"value": "${AZURE_ENV_MODEL_NAME}"
},
"gptModelVersion": {
"value": "${AZURE_ENV_MODEL_VERSION}"
},
"gptModelCapacity": {
"value": "${AZURE_ENV_MODEL_CAPACITY}"
},
"existingFoundryProjectResourceId": {
"value": "${AZURE_ENV_FOUNDRY_PROJECT_ID}"
},
"imageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
},
"enableTelemetry": {
"value": "${AZURE_ENV_ENABLE_TELEMETRY}"
},
"existingLogAnalyticsWorkspaceId": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"solutionName": {
"value": "${AZURE_ENV_NAME}"
},
"location": {
"value": "${AZURE_LOCATION}"
},
"azureAiServiceLocation": {
"value": "${AZURE_ENV_OPENAI_LOCATION}"
},
"gptModelDeploymentType": {
"value": "${AZURE_ENV_MODEL_DEPLOYMENT_TYPE}"
},
"gptModelName": {
"value": "${AZURE_ENV_MODEL_NAME}"
},
"gptModelVersion": {
"value": "${AZURE_ENV_MODEL_VERSION}"
},
"gptModelCapacity": {
"value": "${AZURE_ENV_MODEL_CAPACITY}"
},
"backendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
},
"frontendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
},
"enableTelemetry": {
"value": "${AZURE_ENV_ENABLE_TELEMETRY}"
},
"existingLogAnalyticsWorkspaceId": {
"value": "${AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID}"
},
"backendExists": {
"value": "${SERVICE_BACKEND_RESOURCE_EXISTS=false}"
},
"backendDefinition": {
"value": {
"settings": [
{
"name": "",
"value": "${VAR}",
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR} to use the value of 'VAR' from the current environment."
},
{
"name": "",
"value": "${VAR_S}",
"secret": true,
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR_S} to use the value of 'VAR_S' from the current environment."
}
]
}
},
"frontendExists": {
"value": "${SERVICE_FRONTEND_RESOURCE_EXISTS=false}"
},
"frontendDefinition": {
"value": {
"settings": [
{
"name": "",
"value": "${VAR}",
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR} to use the value of 'VAR' from the current environment."
},
{
"name": "",
"value": "${VAR_S}",
"secret": true,
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR_S} to use the value of 'VAR_S' from the current environment."
}
]
}
},
"principalId": {
"value": "${AZURE_PRINCIPAL_ID}"
}
},
"existingAiFoundryAiProjectResourceId": {
"value": "${AZURE_ENV_FOUNDRY_PROJECT_ID}"
}
}
}
57 changes: 57 additions & 0 deletions infra/main.waf.parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"solutionName": {
"value": "${AZURE_ENV_NAME}"
},
"location": {
"value": "${AZURE_LOCATION}"
},
"azureAiServiceLocation": {
"value": "${AZURE_ENV_OPENAI_LOCATION}"
},
"gptModelDeploymentType": {
"value": "${AZURE_ENV_MODEL_DEPLOYMENT_TYPE}"
},
"gptModelName": {
"value": "${AZURE_ENV_MODEL_NAME}"
},
"gptModelVersion": {
"value": "${AZURE_ENV_MODEL_VERSION}"
},
"gptModelCapacity": {
"value": "${AZURE_ENV_MODEL_CAPACITY}"
},
"backendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
},
"frontendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
},
"enableTelemetry": {
"value": "${AZURE_ENV_ENABLE_TELEMETRY}"
},
"enableMonitoring": {
"value": true
},
"enablePrivateNetworking": {
"value": true
},
"enableScalability": {
"value": true
},
"virtualMachineAdminUsername": {
"value": "${AZURE_ENV_VM_ADMIN_USERNAME}"
},
"virtualMachineAdminPassword": {
"value": "${AZURE_ENV_VM_ADMIN_PASSWORD}"
},
"existingLogAnalyticsWorkspaceId": {
"value": "${AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID}"
},
"existingAiFoundryAiProjectResourceId": {
"value": "${AZURE_ENV_FOUNDRY_PROJECT_ID}"
}
}
}
42 changes: 42 additions & 0 deletions infra/modules/ai-project.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@description('Required. Name of the AI Services project.')
param name string

@description('Required. The location of the Project resource.')
param location string = resourceGroup().location

@description('Optional. The description of the AI Foundry project to create. Defaults to the project name.')
param desc string = name

@description('Required. Name of the existing Cognitive Services resource to create the AI Foundry project in.')
param aiServicesName string

@description('Optional. Tags to be applied to the resources.')
param tags object = {}

// Reference to cognitive service in current resource group for new projects
resource cogServiceReference 'Microsoft.CognitiveServices/accounts@2025-06-01' existing = {
name: aiServicesName
}

resource aiProject 'Microsoft.CognitiveServices/accounts/projects@2025-06-01' = {
parent: cogServiceReference
name: name
tags: tags
location: location
identity: {
type: 'SystemAssigned'
}
properties: {
description: desc
displayName: name
}
}

@description('Required. Name of the AI project.')
output name string = aiProject.name

@description('Required. Resource ID of the AI project.')
output resourceId string = aiProject.id

@description('Required. API endpoint for the AI project.')
output apiEndpoint string = aiProject!.properties.endpoints['AI Foundry API']
Loading
Loading