Skip to content

Instantly share code, notes, and snippets.

@sjwaight
Created October 16, 2025 05:08
Show Gist options
  • Save sjwaight/13d6913d88c3d64c0da0fa80af92e240 to your computer and use it in GitHub Desktop.
Save sjwaight/13d6913d88c3d64c0da0fa80af92e240 to your computer and use it in GitHub Desktop.
Simple Terraform definition showing how to create an AKS Automatic cluster using azapi
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = "demo-auto-rg"
location = "canadacentral"
}
resource "azapi_resource" "automatic-cluster" {
type = "Microsoft.ContainerService/managedClusters@2025-05-01"
name = "auto-demo-cluster"
parent_id = azapi_resource.resourceGroup.id
location = "canadacentral"
body = {
identity = {
type = "SystemAssigned"
}
sku = {
name = "Automatic"
tier = "Standard"
}
properties = {
agentPoolProfiles = [
{
name = "systempool"
mode = "System"
count = 3
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment