A Terraform sample project to create an Azure Kubernetes Services with RBAC + Azure AD
Change the values in the secrets.tfvars and variables.tfvars for the values found in your Azure Service Principal and Azure Active Directory. Define a resource group name and the right location in variables.tfvars
Run in the command line the command below (make sure you have the latest Terraform binary at: https://www.terraform.io/downloads.html) (It works on Terraform 0.11.10 and azure rm provider 1.19.0 or above)
terraform --version
terraform plan -var-file="secrets.tfvars"
terraform apply -var-file="secrets.tfvars"
https://docs.microsoft.com/en-us/azure/aks/aad-integration
https://www.terraform.io/docs/providers/azurerm/r/kubernetes_cluster.html#role_based_access_control