Skip to content

Commit

Permalink
fixup! infra: separate IAM from AKS and image
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Nov 18, 2024
1 parent d1f4a31 commit 2a0e146
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,21 @@ create-pre platform=default_platform:
#!/usr/bin/env bash
set -euo pipefail
case {{ platform }} in
"AKS-CLH-SNP"|"K3s-QEMU-SNP"|"K3s-QEMU-TDX"|"RKE2-QEMU-TDX")
"AKS-CLH-SNP")
# TODO(burgerdev): this should create the resource group for consistency
:
;;
"K3s-QEMU-SNP"|"K3s-QEMU-TDX"|"RKE2-QEMU-TDX")
:
;;
"AKS-PEER-SNP")
echo "resource_group = \"${azure_resource_group}\"" > infra/azure-peerpods-iam/just.auto.tfvars
echo "resource_group = \"${azure_resource_group}_caa_cluster\"" > infra/azure-peerpods-iam/just.auto.tfvars
echo "location = \"${azure_location}\"" >> infra/azure-peerpods-iam/just.auto.tfvars
echo "subscription_id = \"${azure_subscription_id}\"" >> infra/azure-peerpods-iam/just.auto.tfvars
nix run -L .#terraform -- -chdir=infra/azure-peerpods-iam init
nix run -L .#terraform -- -chdir=infra/azure-peerpods-iam apply --auto-approve
nix run -L .#terraform -- -chdir=infra/azure-peerpods-iam output -raw client_secret_env > infra/azure-peerpods/iam.auto.tfvars
echo "resource_group = \"${azure_resource_group}_caa_cluster\"" >> infra/azure-peerpods/iam.auto.tfvars
;;
*)
echo "Unsupported platform: {{ platform }}"
Expand All @@ -216,7 +221,6 @@ create platform=default_platform:
# Populate Terraform variables.
echo "name_prefix = \"$azure_resource_group\"" > infra/azure-peerpods/just.auto.tfvars
echo "resource_group = \"$azure_resource_group\"" >> infra/azure-peerpods/just.auto.tfvars
echo "subscription_id = \"$azure_subscription_id\"" >> infra/azure-peerpods/just.auto.tfvars
nix run -L .#terraform -- -chdir=infra/azure-peerpods init
Expand Down Expand Up @@ -366,7 +370,11 @@ destroy-post platform=default_platform:
#!/usr/bin/env bash
set -euo pipefail
case {{ platform }} in
"AKS-CLH-SNP"|"K3s-QEMU-SNP"|"K3s-QEMU-TDX"|"RKE2-QEMU-TDX")
"AKS-CLH-SNP")
# TODO(burgerdev): this should destroy the resource group for consistency.
:
;;
"K3s-QEMU-SNP"|"K3s-QEMU-TDX"|"RKE2-QEMU-TDX")
:
;;
"AKS-PEER-SNP")
Expand Down

0 comments on commit 2a0e146

Please sign in to comment.