Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit b39d2ff

Browse files
committed
Add OpenAI subscription parameter to deployment configuration
1 parent 900c503 commit b39d2ff

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

infra/deploy.parameters.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"GRAPHRAG_OPENAI_SUBSCRIPTION": "__GRAPHRAG_OPENAI_SUBSCRIPTION__",
23
"GRAPHRAG_API_BASE": "__GRAPHRAG_API_BASE__",
34
"GRAPHRAG_API_VERSION": "__GRAPHRAG_API_VERSION__",
45
"GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME": "__GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME__",
@@ -7,4 +8,4 @@
78
"GRAPHRAG_LLM_MODEL": "__GRAPHRAG_LLM_MODEL__",
89
"LOCATION": "__LOCATION__",
910
"RESOURCE_GROUP": "__RESOURCE_GROUP__"
10-
}
11+
}

infra/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ assignAOAIRoleToManagedIdentity() {
419419
printf "Assigning 'Cognitive Services OpenAI Contributor' role to managed identity... "
420420
local servicePrincipalId=$(jq -r .azure_workload_identity_principal_id.value <<< $AZURE_OUTPUTS)
421421
exitIfValueEmpty "$servicePrincipalId" "Unable to parse service principal id from azure outputs, exiting..."
422-
local scope=$(az cognitiveservices account list --query "[?contains(properties.endpoint, '$GRAPHRAG_API_BASE')] | [0].id" -o tsv)
422+
local scope=$(az cognitiveservices account list --subscription $GRAPHRAG_OPENAI_SUBSCRIPTION --query "[?contains(properties.endpoint, '$GRAPHRAG_API_BASE')] | [0].id" -o tsv)
423423
az role assignment create --only-show-errors \
424424
--role "Cognitive Services OpenAI Contributor" \
425425
--assignee "$servicePrincipalId" \

0 commit comments

Comments
 (0)