File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
scenarios/AksOpenAiTerraform Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -8,24 +8,16 @@ ms.author: ariaamini
88ms.custom : innovation-engine, linux-related-content
99---
1010
11- ## Authenticate (~ 1 minute)
12- Create a new service principal and pass it to Terraform so it can manage Azure resources on your behalf.
13- ``` bash
14- export SERVICE_PRINCIPAL=$( az ad sp create-for-rbac --name " ExecutableDocs" --role=" Contributor" --scopes=" /subscriptions/$SUBSCRIPTION_ID " )
15- export ARM_CLIENT_ID=$( jq -r .appId <<< " $SERVICE_PRINCIPAL" )
16- export ARM_CLIENT_SECRET=$( jq -r .password <<< " $SERVICE_PRINCIPAL" )
17- export ARM_TENANT_ID=$( jq -r .tenant <<< " $SERVICE_PRINCIPAL" )
18- export ARM_SUBSCRIPTION_ID=$SUBSCRIPTION_ID
19- ```
20-
2111## Provision Resources with Terraform (~ 5 minutes)
2212Run terraform to provision all the Azure resources required to setup your new OpenAI website.
2313``` bash
2414# Terraform parses TF_VAR_* as vars (Ex: TF_VAR_name -> name)
25- export TF_VAR_location=$REGION
15+ export TF_VAR_location=" westus3 "
2616export TF_VAR_kubernetes_version=" 1.30.9"
2717export TF_VAR_model_name=" gpt-4o-mini"
2818export TF_VAR_model_version=" 2024-07-18"
19+ # Terraform consumes sub id as $ARM_SUBSCRIPTION_ID
20+ export ARM_SUBSCRIPTION_ID=$SUBSCRIPTION_ID
2921# Run Terraform
3022terraform -chdir=terraform init
3123terraform -chdir=terraform apply -auto-approve
You can’t perform that action at this time.
0 commit comments