Skip to content

Commit 8a0fc58

Browse files
quota check before deploymen
1 parent 8bb3ce7 commit 8a0fc58

3 files changed

Lines changed: 14 additions & 23 deletions

File tree

infra/main.bicep

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,22 @@ targetScope = 'resourceGroup'
66
@description('A unique prefix for all resources in this deployment. This should be 3-20 characters long:')
77
param environmentName string
88

9+
@minLength(1)
10+
@description('Secondary location for databases creation(example:eastus2):')
11+
param secondaryLocation string
12+
913
@metadata({
1014
azd: {
1115
type: 'location'
16+
usageName: [
17+
'OpenAI.GlobalStandard.gpt4.1,200'
18+
'OpenAI.Standard.text-embedding-ada-002,80'
19+
]
1220
}
1321
})
1422

23+
param AZURE_AI_SERVICE_LOCATION string
1524

16-
@minLength(1)
17-
@description('Secondary location for databases creation(example:eastus2):')
18-
param secondaryLocation string
1925

2026
@minLength(1)
2127
@description('GPT model deployment type:')
@@ -37,7 +43,7 @@ param azureOpenaiAPIVersion string = '2024-05-01-preview'
3743
@description('Capacity of the GPT deployment:')
3844
// You can increase this, but capacity is limited per model/region, so you will get errors if you go over
3945
// https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits
40-
param gptDeploymentCapacity int = 30
46+
param gptDeploymentCapacity int = 200
4147

4248
@minLength(1)
4349
@description('Name of the Text Embedding model to deploy:')
@@ -63,6 +69,8 @@ var uniqueId = toLower(uniqueString(environmentName, subscription().id, solution
6369
var solutionPrefix = 'dg${padLeft(take(uniqueId, 12), 12, '0')}'
6470

6571

72+
73+
6674
// ========== Managed Identity ========== //
6775
module managedIdentityModule 'deploy_managed_identity.bicep' = {
6876
name: 'deploy_managed_identity'
@@ -91,7 +99,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
9199
name: 'deploy_ai_foundry'
92100
params: {
93101
solutionName: solutionPrefix
94-
solutionLocation: solutionLocation
102+
solutionLocation: AZURE_AI_SERVICE_LOCATION
95103
keyVaultName: kvault.outputs.keyvaultName
96104
deploymentType: deploymentType
97105
gptModelName: gptModelName

infra/main.bicepparam

Lines changed: 0 additions & 17 deletions
This file was deleted.

infra/scripts/add_cosmosdb_access.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
else
1616
# Use Azure CLI login if running locally
1717
echo "Authenticating with Azure CLI..."
18-
az login
18+
az login --use-device-code
1919
fi
2020
echo "Not authenticated with Azure. Attempting to authenticate..."
2121
fi

0 commit comments

Comments
 (0)