This repository manages the Azure infrastructure for the CTK project using Terraform.
The infrastructure is organized into three main components:
shared/: Shared resources used by all environments (ACR)dev/: Development environmentprod/: Production environment
-
Terraform ≥ 1.0 — Install
-
Azure CLI — Install; authenticate before running any commands:
az login
-
just — command runner used for all deployment commands (github.com/casey/just)
Terraform state is stored in Azure Blob Storage. You need read/write access to the storage container for terraform init to succeed:
- Resource group:
rg-tfstate - Storage account:
stctktfstateprod - Container:
tfstate
- terraform-docs — regenerates module documentation (
just docs) - prek — git hook that auto-runs terraform-docs on
.tffile changes
IMPORTANT: You must deploy the shared infrastructure first, then the environment-specific infrastructure.
The shared infrastructure includes the Azure Container Registry that both dev and prod environments use.
just init shared
just plan shared -out ./shared.plan
just apply shared ./shared.planAfter the shared infrastructure is deployed, you can deploy dev and prod environments.
just init dev
just plan dev -out ./dev.plan
just apply dev ./dev.planjust init prod
just plan prod -out ./prod.plan
just apply prod ./prod.plan- Name:
acrctkshared - Resource Group:
rg-ctk-shared - Purpose: Stores container images for all environments
Both dev and prod environments pull images from this shared registry using:
- System-assigned managed identities
- AcrPull role assignments