Skip to content

Commit 630c4a4

Browse files
committed
Fixes
1 parent 26aa7e9 commit 630c4a4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

scenarios/AksOpenAiTerraform/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ ms.custom: innovation-engine, linux-related-content
1111
## Provision Resources with Terraform (~5 minutes)
1212
Run 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
1623
export TF_VAR_kubernetes_version="1.30.9"
1724
export TF_VAR_model_name="gpt-4o-mini"
1825
export 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
2227
terraform -chdir=terraform init
2328
terraform -chdir=terraform apply -auto-approve

scenarios/AksOpenAiTerraform/terraform/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "azurerm_resource_group" "main" {
4747
# Kubernetes
4848
###############################################################################
4949
resource "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

0 commit comments

Comments
 (0)