Skip to content

Commit 290885f

Browse files
feat: Check available Quota before azd deployment
1 parent b49d4ad commit 290885f

File tree

3 files changed

+50
-20
lines changed

3 files changed

+50
-20
lines changed

infra/main.bicep

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ param azureExistingAIProjectResourceId string = ''
2020
type: 'location'
2121
}
2222
})
23-
param contentUnderstandingLocation string
23+
param contentUnderstandingLocation string = 'swedencentral'
2424

2525
@minLength(1)
2626
@description('Secondary location for databases creation(example:eastus2):')
27-
param secondaryLocation string
27+
param secondaryLocation string = 'eastus2'
2828

2929
@minLength(1)
3030
@description('GPT model deployment type:')
@@ -72,6 +72,20 @@ param useLocalBuild string = 'false'
7272
var useLocalBuildLower = toLower(useLocalBuild)
7373

7474
var uniqueId = toLower(uniqueString(subscription().id, environmentName, solutionLocation))
75+
76+
77+
@metadata({
78+
azd:{
79+
type: 'location'
80+
usageName: [
81+
'OpenAI.GlobalStandard.gpt-4o-mini,30'
82+
'OpenAI.Standard.text-embedding-ada-002,80'
83+
]
84+
}
85+
})
86+
@description('Location for AI Foundry deployment. This is the location where the AI Foundry resources will be deployed.')
87+
param AZURE_AI_SERVICE_LOCATION string
88+
7589
var solutionPrefix = 'km${padLeft(take(uniqueId, 12), 12, '0')}'
7690

7791
var containerRegistryName = '${abbrs.containers.containerRegistry}${solutionPrefix}'
@@ -107,7 +121,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
107121
name: 'deploy_ai_foundry'
108122
params: {
109123
solutionName: solutionPrefix
110-
solutionLocation: solutionLocation
124+
solutionLocation: AZURE_AI_SERVICE_LOCATION
111125
keyVaultName: kvault.outputs.keyvaultName
112126
cuLocation: contentUnderstandingLocation
113127
deploymentType: deploymentType

infra/main.bicepparam

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

infra/main.parameters.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"environmentName": {
6+
"value": "${AZURE_ENV_NAME}"
7+
},
8+
"AZURE_LOCATION": {
9+
"value": "${AZURE_LOCATION}"
10+
},
11+
"secondaryLocation": {
12+
"value": "${AZURE_SECONDARY_LOCATION}"
13+
},
14+
"gptModelVersion": {
15+
"value": "${AZURE_ENV_MODEL_VERSION}"
16+
},
17+
"azureOpenaiAPIVersion ": {
18+
"value": "${AZURE_OPENAI_API_VERSION}"
19+
},
20+
"imageTag": {
21+
"value": "${AZURE_ENV_IMAGETAG}"
22+
},
23+
"existingLogAnalyticsWorkspaceId": {
24+
"value": "${AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID}"
25+
},
26+
"contentUnderstandingLocation" :{
27+
"value": "${AZURE_CONTENT_UNDERSTANDING_LOCATION}"
28+
},
29+
"azureExistingAIProjectResourceId": {
30+
"value": "${AZURE_EXISTING_AI_PROJECT_RESOURCE_ID}"
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)