Skip to content

Commit ab1e4aa

Browse files
committed
oidc_issuer_enabled must be set to true to enable Azure AD Workload Identity
1 parent 677d4f7 commit ab1e4aa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ resource "azurerm_kubernetes_cluster" "main" {
451451
condition = !(var.kms_enabled && var.identity_type != "UserAssigned")
452452
error_message = "KMS etcd encryption doesn't work with system-assigned managed identity."
453453
}
454+
precondition {
455+
condition = var.workload_identity_enabled ? var.oidc_issuer_enabled : true
456+
error_message = "`oidc_issuer_enabled` must be set to `true` to enable Azure AD Workload Identity"
457+
}
454458
}
455459
}
456460

0 commit comments

Comments
 (0)