File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
scenarios/AksOpenAiTerraform Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,18 @@ ms.custom: innovation-engine, linux-related-content
1111## Provision Resources with Terraform (~ 5 minutes)
1212Run terraform to provision all the Azure resources required to setup your new OpenAI website.
1313``` bash
14+ # Authenticate
15+ export ARM_SUBSCRIPTION_ID=$SUBSCRIPTION_ID
16+ az ad sp create-for-rbac --name " ExecutableDocs" --role=" Contributor" --scopes=" /subscriptions/$ARM_SUBSCRIPTION_ID "
17+ export ARM_CLIENT_ID=$( jq .appId <<< " $SP" )
18+ export ARM_CLIENT_SECRET=$( jq .password <<< " $SP" )
19+ export ARM_TENANT_ID=$( jq .tenant <<< " $SP" )
20+
1421# Terraform parses TF_VAR_* as vars (Ex: TF_VAR_name -> name)
15- export TF_VAR_location=" westus3 "
22+ export TF_VAR_location=$REGION
1623export TF_VAR_kubernetes_version=" 1.30.9"
1724export TF_VAR_model_name=" gpt-4o-mini"
1825export TF_VAR_model_version=" 2024-07-18"
19- # Terraform consumes sub id as $ARM_SUBSCRIPTION_ID
20- export ARM_SUBSCRIPTION_ID=$SUBSCRIPTION_ID
2126# Run Terraform
2227terraform -chdir=terraform init
2328terraform -chdir=terraform apply -auto-approve
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ resource "azurerm_resource_group" "main" {
4747# Kubernetes
4848# ##############################################################################
4949resource "azurerm_kubernetes_cluster" "main" {
50- name = " AksCluster"
50+ name = " AksCluster- ${ local . random_id } "
5151 location = var. location
5252 resource_group_name = azurerm_resource_group. main . name
5353
You can’t perform that action at this time.
0 commit comments