Skip to content

Commit 46b49b0

Browse files
authored
Adding a variable for openai location (#2292)
1 parent 051910b commit 46b49b0

File tree

6 files changed

+9
-2
lines changed

6 files changed

+9
-2
lines changed

.azdo/pipelines/azure-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ steps:
4545
AZD_INITIAL_ENVIRONMENT_CONFIG: $(AZD_INITIAL_ENVIRONMENT_CONFIG)
4646
AZURE_OPENAI_SERVICE: $(AZURE_OPENAI_SERVICE)
4747
AZURE_OPENAI_API_VERSION: $(AZURE_OPENAI_API_VERSION)
48+
AZURE_OPENAI_LOCATION: $(AZURE_OPENAI_LOCATION)
4849
AZURE_OPENAI_RESOURCE_GROUP: $(AZURE_OPENAI_RESOURCE_GROUP)
4950
AZURE_DOCUMENTINTELLIGENCE_SERVICE: $(AZURE_DOCUMENTINTELLIGENCE_SERVICE)
5051
AZURE_DOCUMENTINTELLIGENCE_RESOURCE_GROUP: $(AZURE_DOCUMENTINTELLIGENCE_RESOURCE_GROUP)

.github/workflows/azure-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
3131
# project specific
3232
AZURE_OPENAI_SERVICE: ${{ vars.AZURE_OPENAI_SERVICE }}
33+
AZURE_OPENAI_LOCATION: ${{ vars.AZURE_OPENAI_LOCATION }}
3334
AZURE_OPENAI_API_VERSION: ${{ vars.AZURE_OPENAI_API_VERSION }}
3435
AZURE_OPENAI_RESOURCE_GROUP: ${{ vars.AZURE_OPENAI_RESOURCE_GROUP }}
3536
AZURE_DOCUMENTINTELLIGENCE_SERVICE: ${{ vars.AZURE_DOCUMENTINTELLIGENCE_SERVICE }}

azure.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pipeline:
4343
- AZURE_OPENAI_SERVICE
4444
- AZURE_OPENAI_API_VERSION
4545
- AZURE_OPENAI_RESOURCE_GROUP
46+
- AZURE_OPENAI_LOCATION
4647
- AZURE_DOCUMENTINTELLIGENCE_SERVICE
4748
- AZURE_DOCUMENTINTELLIGENCE_RESOURCE_GROUP
4849
- AZURE_DOCUMENTINTELLIGENCE_SKU

docs/deploy_existing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ You should set these values before running `azd up`. Once you've set them, retur
2525

2626
1. Run `azd env set AZURE_OPENAI_SERVICE {Name of existing OpenAI service}`
2727
1. Run `azd env set AZURE_OPENAI_RESOURCE_GROUP {Name of existing resource group that OpenAI service is provisioned to}`
28+
1. Run `azd env set AZURE_OPENAI_LOCATION {Location of existing OpenAI service}`
2829
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT {Name of existing chat deployment}`. Only needed if your chat deployment is not the default 'chat'.
2930
1. Run `azd env set AZURE_OPENAI_CHATGPT_MODEL {Model name of existing chat deployment}`. Only needed if your chat model is not the default 'gpt-35-turbo'.
3031
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION {Version string for existing chat deployment}`. Only needed if your chat deployment model version is not the default '0613'. You definitely need to change this if you changed the model.

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ param chatHistoryContainerName string = 'chat-history'
9191
type: 'location'
9292
}
9393
})
94-
param openAiResourceGroupLocation string
94+
param openAiLocation string
9595

9696
param openAiSkuName string = 'S0'
9797

@@ -586,7 +586,7 @@ module openAi 'br/public:avm/res/cognitive-services/account:0.7.2' = if (isAzure
586586
scope: openAiResourceGroup
587587
params: {
588588
name: !empty(openAiServiceName) ? openAiServiceName : '${abbrs.cognitiveServicesAccounts}${resourceToken}'
589-
location: openAiResourceGroupLocation
589+
location: openAiLocation
590590
tags: tags
591591
kind: 'OpenAI'
592592
customSubDomainName: !empty(openAiServiceName)

infra/main.parameters.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"openAiResourceGroupName": {
2121
"value": "${AZURE_OPENAI_RESOURCE_GROUP}"
2222
},
23+
"openAiLocation": {
24+
"value": "${AZURE_OPENAI_LOCATION}"
25+
},
2326
"openAiSkuName": {
2427
"value": "S0"
2528
},

0 commit comments

Comments
 (0)