Skip to content

Commit c0d5766

Browse files
fix: fixed all copilot comments
1 parent cc728e0 commit c0d5766

8 files changed

Lines changed: 52 additions & 46 deletions

File tree

.github/workflows/deploy-orchestrator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ on:
3838
default: false
3939
type: boolean
4040
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
41-
description: 'Log Analytics Workspace ID (Optional)'
41+
description: 'Log Analytics Workspace Resource ID (Optional)'
4242
required: false
4343
default: ''
4444
type: string
4545
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
46-
description: 'AI Project Resource ID (Optional)'
46+
description: 'Existing AI Project full Azure Resource ID (Optional; must be a full Azure Resource ID, not just the project name or a GUID)'
4747
required: false
4848
default: ''
4949
type: string

.github/workflows/deploy-v2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ on:
8585
type: boolean
8686

8787
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
88-
description: 'Log Analytics Workspace ID (Optional)'
88+
description: 'Log Analytics Workspace Resource ID (Optional)'
8989
required: false
9090
default: ''
9191
type: string
9292
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
93-
description: 'AI Project Resource ID (Optional)'
93+
description: 'Full Azure AI Project Resource ID (Optional, format: /subscriptions/.../resourceGroups/.../providers/...)'
9494
required: false
9595
default: ''
9696
type: string

.github/workflows/job-cleanup-deployment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ jobs:
218218
azd env set AZURE_RESOURCE_GROUP "${RESOURCE_GROUP_NAME}"
219219
azd env set AZURE_SUBSCRIPTION_ID "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
220220
azd env set AZURE_LOCATION="${AZURE_LOCATION}"
221-
azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE="${AZURE_ENV_OPENAI_LOCATION}"
222221
fi
223222
224223
- name: Delete deployment using azd

.github/workflows/job-deploy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ on:
4747
default: ''
4848
type: string
4949
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
50-
description: 'Log Analytics Workspace ID (Optional)'
50+
description: 'Log Analytics Workspace Resource ID (Optional)'
5151
required: false
5252
default: ''
5353
type: string
5454
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
55-
description: 'AI Project Resource ID (Optional)'
55+
description: 'Existing AI Project Resource ID in full Azure Resource ID format (Optional, for example: /subscriptions/...)'
5656
required: false
5757
default: ''
5858
type: string
@@ -388,7 +388,11 @@ jobs:
388388
rg_exists=$(az group exists --name $RESOURCE_GROUP_NAME)
389389
if [ "$rg_exists" = "false" ]; then
390390
echo "📦 Resource group does not exist. Creating new resource group '$RESOURCE_GROUP_NAME' in location '$AZURE_LOCATION'..."
391-
az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION --tags ${{ env.RG_TAGS }} || { echo "❌ Error creating resource group"; exit 1; }
391+
TAG_ARGS=""
392+
if [ -n "${{ env.RG_TAGS }}" ]; then
393+
TAG_ARGS="--tags ${{ env.RG_TAGS }}"
394+
fi
395+
az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION $TAG_ARGS || { echo "❌ Error creating resource group"; exit 1; }
392396
echo "✅ Resource group '$RESOURCE_GROUP_NAME' created successfully."
393397
else
394398
echo "✅ Resource group '$RESOURCE_GROUP_NAME' already exists. Deploying to existing resource group."

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ param gptModelName string = 'gpt-5.1'
6060
@description('Optional. Version of AI model. Review available version numbers per model before setting. Defaults to 2025-11-13.')
6161
param gptModelVersion string = '2025-11-13'
6262

63-
@description('Optional. GPT model deployment token capacity. Lower this if initial provisioning fails due to capacity. Defaults to 50K tokens per minute to improve regional success rate.')
63+
@description('Optional. GPT model deployment token capacity. Lower this if initial provisioning fails due to capacity. Defaults to 500K tokens per minute to improve regional success rate.')
6464
param gptDeploymentCapacity int = 500
6565

6666
@minLength(1)
@@ -1374,7 +1374,7 @@ module containerAppProcessor 'br/public:avm/res/app/container-app:0.18.1' = {
13741374
// Internal ingress required for container-to-container communication
13751375
ingressTargetPort: 8080
13761376
ingressExternal: false
1377-
ingressAllowInsecure: true // Allow HTTP without SSL redirect for internal calls
1377+
ingressAllowInsecure: false
13781378
scaleSettings: {
13791379
maxReplicas: enableScalability ? 3 : 1
13801380
minReplicas: 1

infra/main.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.42.1.51946",
9-
"templateHash": "18053986120321996236"
8+
"version": "0.36.177.2456",
9+
"templateHash": "8711849552667845282"
1010
}
1111
},
1212
"parameters": {
@@ -358,7 +358,7 @@
358358
},
359359
"appIdentity": {
360360
"type": "Microsoft.Resources/deployments",
361-
"apiVersion": "2025-04-01",
361+
"apiVersion": "2022-09-01",
362362
"name": "[take(format('avm.res.managed-identity.user-assigned-identity.{0}', variables('userAssignedIdentityResourceName')), 64)]",
363363
"properties": {
364364
"expressionEvaluationOptions": {
@@ -841,7 +841,7 @@
841841
"logAnalyticsWorkspace": {
842842
"condition": "[and(or(parameters('enableMonitoring'), parameters('enablePrivateNetworking')), not(variables('useExistingLogAnalytics')))]",
843843
"type": "Microsoft.Resources/deployments",
844-
"apiVersion": "2025-04-01",
844+
"apiVersion": "2022-09-01",
845845
"name": "[take(format('avm.res.operational-insights.workspace.{0}', variables('logAnalyticsWorkspaceResourceName')), 64)]",
846846
"properties": {
847847
"expressionEvaluationOptions": {
@@ -3947,7 +3947,7 @@
39473947
"applicationInsights": {
39483948
"condition": "[parameters('enableMonitoring')]",
39493949
"type": "Microsoft.Resources/deployments",
3950-
"apiVersion": "2025-04-01",
3950+
"apiVersion": "2022-09-01",
39513951
"name": "[take(format('avm.res.insights.component.{0}', variables('applicationInsightsResourceName')), 64)]",
39523952
"properties": {
39533953
"expressionEvaluationOptions": {
@@ -4678,7 +4678,7 @@
46784678
"virtualNetwork": {
46794679
"condition": "[parameters('enablePrivateNetworking')]",
46804680
"type": "Microsoft.Resources/deployments",
4681-
"apiVersion": "2025-04-01",
4681+
"apiVersion": "2022-09-01",
46824682
"name": "[take(format('module.virtual-network.{0}', variables('solutionSuffix')), 64)]",
46834683
"properties": {
46844684
"expressionEvaluationOptions": {
@@ -4715,8 +4715,8 @@
47154715
"metadata": {
47164716
"_generator": {
47174717
"name": "bicep",
4718-
"version": "0.42.1.51946",
4719-
"templateHash": "2245351167779444314"
4718+
"version": "0.36.177.2456",
4719+
"templateHash": "14325184480475687154"
47204720
}
47214721
},
47224722
"definitions": {
@@ -5160,7 +5160,7 @@
51605160
},
51615161
"condition": "[not(empty(tryGet(parameters('subnets')[copyIndex()], 'networkSecurityGroup')))]",
51625162
"type": "Microsoft.Resources/deployments",
5163-
"apiVersion": "2025-04-01",
5163+
"apiVersion": "2022-09-01",
51645164
"name": "[take(format('avm.res.network.network-security-group.{0}.{1}', tryGet(parameters('subnets')[copyIndex()], 'networkSecurityGroup', 'name'), parameters('resourceSuffix')), 64)]",
51655165
"properties": {
51665166
"expressionEvaluationOptions": {
@@ -5812,7 +5812,7 @@
58125812
},
58135813
"virtualNetwork": {
58145814
"type": "Microsoft.Resources/deployments",
5815-
"apiVersion": "2025-04-01",
5815+
"apiVersion": "2022-09-01",
58165816
"name": "[take(format('avm.res.network.virtual-network.{0}', parameters('name')), 64)]",
58175817
"properties": {
58185818
"expressionEvaluationOptions": {
@@ -7539,7 +7539,7 @@
75397539
"bastionHost": {
75407540
"condition": "[parameters('enablePrivateNetworking')]",
75417541
"type": "Microsoft.Resources/deployments",
7542-
"apiVersion": "2025-04-01",
7542+
"apiVersion": "2022-09-01",
75437543
"name": "[take(format('avm.res.network.bastion-host.{0}', variables('bastionHostName')), 64)]",
75447544
"properties": {
75457545
"expressionEvaluationOptions": {
@@ -8845,7 +8845,7 @@
88458845
"jumpboxVM": {
88468846
"condition": "[parameters('enablePrivateNetworking')]",
88478847
"type": "Microsoft.Resources/deployments",
8848-
"apiVersion": "2025-04-01",
8848+
"apiVersion": "2022-09-01",
88498849
"name": "[take(format('avm.res.compute.virtual-machine.{0}', variables('jumpboxVmName')), 64)]",
88508850
"properties": {
88518851
"expressionEvaluationOptions": {
@@ -17178,7 +17178,7 @@
1717817178
},
1717917179
"condition": "[and(parameters('enablePrivateNetworking'), or(empty(parameters('existingFoundryProjectResourceId')), not(contains(variables('aiRelatedDnsZoneIndices'), copyIndex()))))]",
1718017180
"type": "Microsoft.Resources/deployments",
17181-
"apiVersion": "2025-04-01",
17181+
"apiVersion": "2022-09-01",
1718217182
"name": "[format('dns-zone-{0}', copyIndex())]",
1718317183
"properties": {
1718417184
"expressionEvaluationOptions": {
@@ -20345,7 +20345,7 @@
2034520345
},
2034620346
"storageAccount": {
2034720347
"type": "Microsoft.Resources/deployments",
20348-
"apiVersion": "2025-04-01",
20348+
"apiVersion": "2022-09-01",
2034920349
"name": "[take(format('avm.res.storage.storage-account.{0}', variables('storageAccountName')), 64)]",
2035020350
"properties": {
2035120351
"expressionEvaluationOptions": {
@@ -26142,7 +26142,7 @@
2614226142
},
2614326143
"cosmosDb": {
2614426144
"type": "Microsoft.Resources/deployments",
26145-
"apiVersion": "2025-04-01",
26145+
"apiVersion": "2022-09-01",
2614626146
"name": "[take(format('avm.res.document-db.database-account.{0}', variables('cosmosDbResourceName')), 64)]",
2614726147
"properties": {
2614826148
"expressionEvaluationOptions": {
@@ -30025,7 +30025,7 @@
3002530025
"existingAiFoundryAiServicesDeployments": {
3002630026
"condition": "[variables('useExistingAiFoundryAiProject')]",
3002730027
"type": "Microsoft.Resources/deployments",
30028-
"apiVersion": "2025-04-01",
30028+
"apiVersion": "2022-09-01",
3002930029
"name": "[take(format('module.ai-services-model-deployments.{0}', variables('aiFoundryAiServicesResourceName')), 64)]",
3003030030
"subscriptionId": "[variables('aiFoundryAiServicesSubscriptionId')]",
3003130031
"resourceGroup": "[variables('aiFoundryAiServicesResourceGroupName')]",
@@ -30103,8 +30103,8 @@
3010330103
"metadata": {
3010430104
"_generator": {
3010530105
"name": "bicep",
30106-
"version": "0.42.1.51946",
30107-
"templateHash": "16866311185741009453"
30106+
"version": "0.36.177.2456",
30107+
"templateHash": "15406919741214273256"
3010830108
}
3010930109
},
3011030110
"definitions": {
@@ -30411,7 +30411,7 @@
3041130411
},
3041230412
"type": "Microsoft.Authorization/roleAssignments",
3041330413
"apiVersion": "2022-04-01",
30414-
"scope": "[resourceId('Microsoft.CognitiveServices/accounts', parameters('name'))]",
30414+
"scope": "[format('Microsoft.CognitiveServices/accounts/{0}', parameters('name'))]",
3041530415
"name": "[coalesce(tryGet(coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()], 'name'), guid(resourceId('Microsoft.CognitiveServices/accounts', parameters('name')), coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()].principalId, coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()].roleDefinitionId))]",
3041630416
"properties": {
3041730417
"roleDefinitionId": "[coalesce(variables('formattedRoleAssignments'), createArray())[copyIndex()].roleDefinitionId]",
@@ -30433,7 +30433,7 @@
3043330433
"aiFoundryAiServices": {
3043430434
"condition": "[not(variables('useExistingAiFoundryAiProject'))]",
3043530435
"type": "Microsoft.Resources/deployments",
30436-
"apiVersion": "2025-04-01",
30436+
"apiVersion": "2022-09-01",
3043730437
"name": "[take(format('avm.res.cognitive-services.account.{0}', variables('aiFoundryAiServicesResourceName')), 64)]",
3043830438
"properties": {
3043930439
"expressionEvaluationOptions": {
@@ -33083,7 +33083,7 @@
3308333083
"aiFoundryPrivateEndpoint": {
3308433084
"condition": "[and(parameters('enablePrivateNetworking'), not(variables('useExistingAiFoundryAiProject')))]",
3308533085
"type": "Microsoft.Resources/deployments",
33086-
"apiVersion": "2025-04-01",
33086+
"apiVersion": "2022-09-01",
3308733087
"name": "[take(format('pep-{0}-deployment', variables('aiFoundryAiServicesResourceName')), 64)]",
3308833088
"properties": {
3308933089
"expressionEvaluationOptions": {
@@ -33854,15 +33854,15 @@
3385433854
"dependsOn": [
3385533855
"aiFoundryAiServices",
3385633856
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
33857-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
3385833857
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
33858+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
3385933859
"virtualNetwork"
3386033860
]
3386133861
},
3386233862
"aiFoundryProject": {
3386333863
"condition": "[not(variables('useExistingAiFoundryAiProject'))]",
3386433864
"type": "Microsoft.Resources/deployments",
33865-
"apiVersion": "2025-04-01",
33865+
"apiVersion": "2022-09-01",
3386633866
"name": "[take(format('module.ai-project.{0}', variables('aiFoundryAiProjectResourceName')), 64)]",
3386733867
"properties": {
3386833868
"expressionEvaluationOptions": {
@@ -33892,8 +33892,8 @@
3389233892
"metadata": {
3389333893
"_generator": {
3389433894
"name": "bicep",
33895-
"version": "0.42.1.51946",
33896-
"templateHash": "16351752584270870112"
33895+
"version": "0.36.177.2456",
33896+
"templateHash": "9521962578302996488"
3389733897
}
3389833898
},
3389933899
"parameters": {
@@ -33986,7 +33986,7 @@
3398633986
},
3398733987
"appConfiguration": {
3398833988
"type": "Microsoft.Resources/deployments",
33989-
"apiVersion": "2025-04-01",
33989+
"apiVersion": "2022-09-01",
3399033990
"name": "[take(format('avm.res.app-config.store.{0}', variables('solutionSuffix')), 64)]",
3399133991
"properties": {
3399233992
"expressionEvaluationOptions": {
@@ -36331,7 +36331,7 @@
3633136331
"avmAppConfigUpdated": {
3633236332
"condition": "[parameters('enablePrivateNetworking')]",
3633336333
"type": "Microsoft.Resources/deployments",
36334-
"apiVersion": "2025-04-01",
36334+
"apiVersion": "2022-09-01",
3633536335
"name": "[take(format('avm.res.app-configuration.configuration-store-update.{0}', variables('solutionSuffix')), 64)]",
3633636336
"properties": {
3633736337
"expressionEvaluationOptions": {
@@ -38348,7 +38348,7 @@
3834838348
},
3834938349
"containerAppsEnvironment": {
3835038350
"type": "Microsoft.Resources/deployments",
38351-
"apiVersion": "2025-04-01",
38351+
"apiVersion": "2022-09-01",
3835238352
"name": "[take(format('avm.res.app.managed-environment.{0}', variables('solutionSuffix')), 64)]",
3835338353
"properties": {
3835438354
"expressionEvaluationOptions": {
@@ -38367,7 +38367,7 @@
3836738367
"systemAssigned": true
3836838368
}
3836938369
},
38370-
"appLogsConfiguration": "[if(parameters('enableMonitoring'), createObject('value', createObject('destination', 'log-analytics', 'logAnalyticsConfiguration', createObject('customerId', if(variables('useExistingLogAnalytics'), reference('existingLogAnalyticsWorkspace').customerId, reference('logAnalyticsWorkspace').outputs.logAnalyticsWorkspaceId.value), 'sharedKey', if(variables('useExistingLogAnalytics'), listKeys('existingLogAnalyticsWorkspace', '2020-08-01').primarySharedKey, listOutputsWithSecureValues('logAnalyticsWorkspace', '2025-04-01').primarySharedKey)))), createObject('value', null()))]",
38370+
"appLogsConfiguration": "[if(parameters('enableMonitoring'), createObject('value', createObject('destination', 'log-analytics', 'logAnalyticsConfiguration', createObject('customerId', if(variables('useExistingLogAnalytics'), reference('existingLogAnalyticsWorkspace').customerId, reference('logAnalyticsWorkspace').outputs.logAnalyticsWorkspaceId.value), 'sharedKey', if(variables('useExistingLogAnalytics'), listKeys('existingLogAnalyticsWorkspace', '2020-08-01').primarySharedKey, listOutputsWithSecureValues('logAnalyticsWorkspace', '2022-09-01').primarySharedKey)))), createObject('value', null()))]",
3837138371
"workloadProfiles": {
3837238372
"value": [
3837338373
{
@@ -39269,7 +39269,7 @@
3926939269
},
3927039270
"containerAppBackend": {
3927139271
"type": "Microsoft.Resources/deployments",
39272-
"apiVersion": "2025-04-01",
39272+
"apiVersion": "2022-09-01",
3927339273
"name": "[take(format('avm.res.app.container-app.{0}', variables('backendContainerAppName')), 64)]",
3927439274
"properties": {
3927539275
"expressionEvaluationOptions": {
@@ -40916,7 +40916,7 @@
4091640916
},
4091740917
"containerAppFrontend": {
4091840918
"type": "Microsoft.Resources/deployments",
40919-
"apiVersion": "2025-04-01",
40919+
"apiVersion": "2022-09-01",
4092040920
"name": "[take(format('avm.res.app.container-app.{0}', variables('frontEndContainerAppName')), 64)]",
4092140921
"properties": {
4092240922
"expressionEvaluationOptions": {
@@ -42564,7 +42564,7 @@
4256442564
},
4256542565
"containerAppProcessor": {
4256642566
"type": "Microsoft.Resources/deployments",
42567-
"apiVersion": "2025-04-01",
42567+
"apiVersion": "2022-09-01",
4256842568
"name": "[take(format('avm.res.app.container-app.{0}', variables('processorContainerAppName')), 64)]",
4256942569
"properties": {
4257042570
"expressionEvaluationOptions": {
@@ -42608,7 +42608,7 @@
4260842608
"value": false
4260942609
},
4261042610
"ingressAllowInsecure": {
42611-
"value": true
42611+
"value": false
4261242612
},
4261342613
"scaleSettings": {
4261442614
"value": {

infra/main.parameters.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
},
4141
"imageTag": {
4242
"value": "${AZURE_ENV_IMAGE_TAG}"
43+
},
44+
"enableTelemetry": {
45+
"value": "true"
4346
}
4447
}
4548
}

infra/main_custom.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ param gptModelName string = 'gpt-5.1'
6868
@description('Optional. Version of AI model. Review available version numbers per model before setting. Defaults to 2025-11-13.')
6969
param gptModelVersion string = '2025-11-13'
7070

71-
@description('Optional. GPT model deployment token capacity. Lower this if initial provisioning fails due to capacity. Defaults to 50K tokens per minute to improve regional success rate.')
72-
param gptDeploymentCapacity int = 1
71+
@description('Optional. GPT model deployment token capacity. Lower this if initial provisioning fails due to capacity. Defaults to 500K tokens per minute to improve regional success rate.')
72+
param gptDeploymentCapacity int = 500
7373

7474
@description('Optional. The tags to apply to all deployed Azure resources.')
7575
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {}
@@ -1338,7 +1338,7 @@ module containerAppProcessor 'br/public:avm/res/app/container-app:0.18.1' = {
13381338
// Internal ingress required for container-to-container communication
13391339
ingressTargetPort: 8080
13401340
ingressExternal: false
1341-
ingressAllowInsecure: true // Allow HTTP without SSL redirect for internal calls
1341+
ingressAllowInsecure: false
13421342
scaleSettings: {
13431343
maxReplicas: enableScalability ? 3 : 1
13441344
minReplicas: 1

0 commit comments

Comments
 (0)