Skip to content

Commit 643594d

Browse files
committed
EOD code upload
1 parent f7b9428 commit 643594d

6 files changed

Lines changed: 31 additions & 16 deletions

File tree

infra/main.bicep

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ param location string = resourceGroup().location
4646
param azureAiServiceLocation string = location
4747

4848
@description('Optional. AI model deployment token capacity. Defaults to 5K tokens per minute.')
49-
param capacity int = 100 // was 5 before = 5K
49+
param capacity int = 5 // was 5 before = 5K
5050

5151
@description('Optional. Enable monitoring for the resources. This will enable Application Insights and Log Analytics. Defaults to false.')
5252
param enableMonitoring bool = false
@@ -192,12 +192,13 @@ module aiServices 'modules/ai-services/main.bicep' = {
192192
deployments: [modelDeployment]
193193
projectName: 'proj-${resourcesName}'
194194
logAnalyticsWorkspaceResourceId: enableMonitoring ? logAnalyticsWorkspace.outputs.resourceId : ''
195-
// privateNetworking: enablePrivateNetworking
196-
// ? {
197-
// virtualNetworkResourceId: network.outputs.vnetResourceId
198-
// subnetResourceId: network.outputs.subnetPrivateEndpointsResourceId
199-
// }
200-
// : null
195+
// Enable privateNetworking. See infra/modules/ai-services/main.bicep for addtional configurations.
196+
privateNetworking: enablePrivateNetworking
197+
? {
198+
virtualNetworkResourceId: network.outputs.vnetResourceId
199+
subnetResourceId: network.outputs.subnetPrivateEndpointsResourceId
200+
}
201+
: null
201202
roleAssignments: [
202203
{
203204
principalId: appIdentity.outputs.principalId

infra/main.bicepparam

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ param location = readEnvironmentVariable('AZURE_LOCATION')
1010
// Refer to infra/main.waf-aligned.bicep for the WAF-aligned configuration
1111
// //*******************************************************************************
1212

13-
// param enableMonitoring = true
14-
// param enableScaling = true
15-
// param enableRedundancy = true
13+
param enableMonitoring = true
14+
param enableScaling = true
15+
param enableRedundancy = true
16+
//param secondaryLocation = 'uksouth' // TODO - test this
17+
18+
param enablePrivateNetworking = true
19+
param vmAdminUsername = 'JumpboxAdminUser'
20+
param vmAdminPassword = 'JumpboxAdminP@ssw0rd1234!'
1621

17-
// param enablePrivateNetworking = true
18-
// param vmAdminUsername = 'JumpboxAdminUser'
19-
// param vmAdminPassword = 'JumpboxAdminP@ssw0rd1234!'
2022

21-
//param secondaryLocation = 'uksouth' // TODO - test this

infra/main.waf-aligned.bicepparam

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ param location = readEnvironmentVariable('AZURE_LOCATION')
1010
param enableMonitoring = true
1111
param enableScaling = true
1212
param enableRedundancy = true
13+
//param secondaryLocation = 'uksouth' // TODO - test this
1314

1415
param enablePrivateNetworking = true
1516
param vmAdminUsername = 'JumpboxAdminUser'
1617
param vmAdminPassword = 'JumpboxAdminP@ssw0rd1234!'
1718

18-
//param secondaryLocation = 'uksouth' // TODO - test this
19+

infra/modules/ai-services/main.bicep

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ module cognitiveService 'br/public:avm/res/cognitive-services/account:0.11.0' =
118118
tags: tags
119119
sku: sku
120120
kind: kind
121+
121122
allowProjectManagement: true
122123
managedIdentities: {
123124
systemAssigned: true
@@ -126,6 +127,17 @@ module cognitiveService 'br/public:avm/res/cognitive-services/account:0.11.0' =
126127
customSubDomainName: name
127128
disableLocalAuth: false
128129
publicNetworkAccess: privateNetworking != null ? 'Disabled' : 'Enabled'
130+
// rules to allow firewall and virtual network access
131+
networkAcls: {
132+
defaultAction: 'Deny'
133+
bypass: 'AzureServices'
134+
virtualNetworkRules: privateNetworking != null ? [
135+
{
136+
id: privateNetworking!.subnetResourceId
137+
}
138+
] : []
139+
ipRules: []
140+
} // end of rules to allow firewall and virtual network access
129141
diagnosticSettings: !empty(logAnalyticsWorkspaceResourceId)
130142
? [
131143
{

infra/modules/aiServices.bicep

Whitespace-only changes.

infra/modules/cosmosDb.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module cosmosAccount 'br/public:avm/res/document-db/database-account:0.15.0' = {
8080
locationName: location
8181
}
8282
{
83-
failoverPriority: 0
83+
failoverPriority: 1
8484
isZoneRedundant: zoneRedundant
8585
locationName: secondaryLocation!
8686
}

0 commit comments

Comments
 (0)