To install the Dapr extension on an Azure Kubernetes Service (AKS) cluster, Azure recommends using the AKS community extension repository, where it is available under microsoft.aks.managedClusters/extensions.
The first step to installing extensions on your AKS cluster with Terraform is to give your cluster a managed identity.
Extensions have different configuration settings, which you can configure in the configuration_settings block of your azurerm_kubernetes_cluster_extension resource.
Installing AKS extensions with Terraform is fairly straightforward, this gives us the advantage of installing our extensions in a declarative way instead of configuring them imperatively.
The Dapr extension provisions the Dapr control plan on your AKS cluster and creates a few Kubernetes services, which include dapr-operator, dapr-sidecar-injector, dapr-placement, and dapr-sentry.
AKS cluster extensions are available in AzureRm provider and configuration_settings are an optional configuration settings property.
You can create a dapr-extension module, or use one of modules available in the AKS extension directory.
To get started with Dapr, developers essentially need to create deployments that specify Dapr's services and use Dapr's building block APIs by adding annotations to their deployments.
Installing the Dapr extension on an AKS cluster is a straightforward process and can be declaratively installed with Terraform.
By using a managed identity, Terraform can configure the Dapr cluster extension on your AKS cluster with ease.