Ensure RBAC is enabled on AKS clusters

Explanation

Using Kubernetes role-based access control (RBAC), you can grant users, groups, and service accounts access to only the resources they need.

Possible Impact

No role based access control is in place for the AKS cluster

Suggested Resolution

Enable RBAC

Insecure Example

The following example will fail the azure-container-use-rbac-permissions check.

resource "azurerm_kubernetes_cluster" "bad_example" {
	role_based_access_control {
		enabled = false
	}
}

Secure Example

The following example will pass the azure-container-use-rbac-permissions check.

resource "azurerm_kubernetes_cluster" "good_example" {
	role_based_access_control {
		enabled = true
	}
}

Getting Started
Provider Checks
Config
GitHub Actions