Menu

1 / 2

Upgrading AKS Terraform modules from azurerm 3.x to 5.x: what broke and how I fixed it

DEV Community: terraform·Sai Medarametla·22 days ago
#CnpEcC8n
#devtoterraform#devto#dev#enter#exit
Long article (281 words) — no AI summary yet.
Reading 0:00
15s threshold

I maintain reusable Terraform modules for AKS on GitHub: terraform-aks-modules . They were pinned to azurerm 3.x, two major versions behind, so I upgraded them to 5.x. Here's what broke.

The expected changes

Provider ~> 3.100 → ~> 5.13 , and Terraform >= 1.7 (needed for mock providers in tests)

enable_auto_scaling → auto_scaling_enabled

automatic_channel_upgrade → automatic_upgrade_channel

managed removed from the Entra ID block (always on now)

New required node_provisioning_profile { mode = "Manual" }

Key Vault needs rbac_authorization_enabled set explicitly

What CI caught

After those changes, 6 of 14 checks still failed.

1. Entra ID needs a tenant or admin groups

Error: Missing required argument one of `admin_group_object_ids,tenant_id` must be specified

Enter fullscreen mode

Exit fullscreen mode

Fix:

azure_active_directory_role_based_access_control { tenant_id = data . azurerm_client_config . current . tenant_id admin_group_object_ids = var .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.