Azure Kubernetes Cluster and Managed Identity

In azurm_kubernetes_cluster how to create a cluster that would use Managed Identity. In Azure Portal ald CLI there is a direct flag for that. The provider does not have such option. I am forced to provide an ID of precreated service principal.

Is there a way to do it ? The docs provide no info on that.

Regards

You can have a look to this article https://www.danielstechblog.io/terraform-deploy-an-aks-cluster-using-managed-identity-and-managed-azure-ad-integration/

Even he has this repo, with the configuration needed