|
| 1 | +--- |
| 2 | +name: Azure AKS Cluster |
| 3 | +supportedPlatforms: |
| 4 | + - azure |
| 5 | +description: | |
| 6 | + Provision a production-grade Azure Kubernetes Service (AKS) cluster with Azure AD, OIDC, Workload Identity, Log Analytics and custom VNet using Terraform." |
| 7 | +--- |
| 8 | + |
| 9 | +# Azure AKS Terraform Module |
| 10 | + |
| 11 | +This Terraform module provisions a production-ready [Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/) cluster including: |
| 12 | + |
| 13 | +- Azure AD-based authentication |
| 14 | +- Workload Identity & OIDC issuer enabled |
| 15 | +- Custom Virtual Network & Subnet |
| 16 | +- Log Analytics integration (Monitoring) |
| 17 | +- Auto-scaling node pool |
| 18 | +- System-assigned managed identity |
| 19 | + |
| 20 | +## 🚀 Features |
| 21 | + |
| 22 | +- ✅ Production-grade configuration |
| 23 | +- 🔐 Integrated Azure AD admin group |
| 24 | +- ☁️ Log Analytics Workspace (LAW) with `oms_agent` |
| 25 | +- 🧠 OIDC issuer & Workload Identity support |
| 26 | +- 🌐 Custom virtual network and subnet |
| 27 | +- 📈 Auto-scaling system node pool |
| 28 | + |
| 29 | +<!-- BEGIN_TF_DOCS --> |
| 30 | +## Requirements |
| 31 | + |
| 32 | +| Name | Version | |
| 33 | +|------|---------| |
| 34 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.0 | |
| 35 | +| <a name="requirement_azuread"></a> [azuread](#requirement\_azuread) | 3.4.0 | |
| 36 | +| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | 4.36.0 | |
| 37 | + |
| 38 | +## Modules |
| 39 | + |
| 40 | +No modules. |
| 41 | + |
| 42 | +## Resources |
| 43 | + |
| 44 | +| Name | Type | |
| 45 | +|------|------| |
| 46 | +| [azurerm_kubernetes_cluster.aks](https://registry.terraform.io/providers/hashicorp/azurerm/4.36.0/docs/resources/kubernetes_cluster) | resource | |
| 47 | +| [azurerm_log_analytics_workspace.law](https://registry.terraform.io/providers/hashicorp/azurerm/4.36.0/docs/resources/log_analytics_workspace) | resource | |
| 48 | +| [azurerm_resource_group.aks](https://registry.terraform.io/providers/hashicorp/azurerm/4.36.0/docs/resources/resource_group) | resource | |
| 49 | +| [azurerm_subnet.aks_subnet](https://registry.terraform.io/providers/hashicorp/azurerm/4.36.0/docs/resources/subnet) | resource | |
| 50 | +| [azurerm_virtual_network.vnet](https://registry.terraform.io/providers/hashicorp/azurerm/4.36.0/docs/resources/virtual_network) | resource | |
| 51 | + |
| 52 | +## Inputs |
| 53 | + |
| 54 | +| Name | Description | Type | Default | Required | |
| 55 | +|------|-------------|------|---------|:--------:| |
| 56 | +| <a name="input_agent_count"></a> [agent\_count](#input\_agent\_count) | n/a | `number` | `3` | no | |
| 57 | +| <a name="input_aks_admin_group_object_id"></a> [aks\_admin\_group\_object\_id](#input\_aks\_admin\_group\_object\_id) | Object ID of the Azure AD group used for AKS admin access | `string` | n/a | yes | |
| 58 | +| <a name="input_aks_cluster_name"></a> [aks\_cluster\_name](#input\_aks\_cluster\_name) | n/a | `string` | `"prod-aks"` | no | |
| 59 | +| <a name="input_dns_prefix"></a> [dns\_prefix](#input\_dns\_prefix) | n/a | `string` | `"prodaks"` | no | |
| 60 | +| <a name="input_kubernetes_version"></a> [kubernetes\_version](#input\_kubernetes\_version) | n/a | `string` | `"1.29.2"` | no | |
| 61 | +| <a name="input_location"></a> [location](#input\_location) | n/a | `string` | `"Germany West Central"` | no | |
| 62 | +| <a name="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name) | n/a | `string` | `"aks-prod-rg"` | no | |
| 63 | +| <a name="input_vm_size"></a> [vm\_size](#input\_vm\_size) | n/a | `string` | `"Standard_DS3_v2"` | no | |
| 64 | + |
| 65 | +## Outputs |
| 66 | + |
| 67 | +| Name | Description | |
| 68 | +|------|-------------| |
| 69 | +| <a name="output_aks_identity_client_id"></a> [aks\_identity\_client\_id](#output\_aks\_identity\_client\_id) | Client ID of the AKS system-assigned managed identity | |
| 70 | +| <a name="output_kube_config"></a> [kube\_config](#output\_kube\_config) | Kubeconfig raw output | |
| 71 | +| <a name="output_law_id"></a> [law\_id](#output\_law\_id) | Log Analytics Workspace ID | |
| 72 | +| <a name="output_oidc_issuer_url"></a> [oidc\_issuer\_url](#output\_oidc\_issuer\_url) | OIDC issuer URL for federated identity and workload identity setup | |
| 73 | +| <a name="output_subnet_id"></a> [subnet\_id](#output\_subnet\_id) | Subnet ID used by AKS | |
| 74 | +<!-- END_TF_DOCS --> |
0 commit comments