kubernetes

avinor/kubernetes/azurerm

Terraform Module HCL AZURERM

Terraform module to deploy a Kubernetes cluster on Azure, using AKS.

Install
module "kubernetes" {
source = "avinor/kubernetes/azurerm"
version = "6.2.1"
}
⭐ Source on GitHub 📦 Registry page
README

Kubernetes Terraform module to deploy a Kubernetes cluster on Azure by using the managed Kubernetes solution AKS. For security reasons it will only deploy a rbac enabled clusters. From version 5.0.0 AKS is configured with a system assigned managed identity that is automatically created. It is not required to grant the manged identity any roles, this module will make sure to grant required roles. That does however mean that the deployment has to run with Owner privileges. Migrating from service principal identity from earlier version is supported. Make sure to validate role assignments when upgrading to version 5.0.0 or higher. From version 1.5.0 of module it will assign the first node pool defined as the default one, this cannot be changed later. If changing any variable that requires node

Inputs (27)
NameTypeDescriptionDefault
agent_poolslist(any)A list of agent pools to create, each item supports same properties as `agent_po required
resource_group_namestringName of resource group to deploy resources in. required
service_cidrstringCidr of service subnet. If subnet has UDR make sure this is routed correctly. required
kubernetes_versionstringVersion of Kubernetes to deploy. required
namestringName of the Kubernetes cluster. required
locationstringThe Azure Region in which to create resource. required
container_registrieslist(string)List of Azure Container Registry ids where AKS needs pull access.[]
key_vault_secrets_providerobject({ enabled Key Vault secrets provider settings.{ "enabled": false, "secret_rotation
node_os_channel_upgradestringThe upgrade channel for this Kubernetes Cluster Nodes' OS Image."NodeImage"
maintenance_window_node_osobject({ frequency = optMaintenance window of node os upgrades.null
node_resource_groupstringThe name of the Resource Group where the Kubernetes Nodes should exist.null
windows_profileobject({ username = stringAdmin username and password for Windows hosts.null
service_accountslist(object({ name = List of service accounts to create and their roles.[]
diagnosticsobject({ destination = sDiagnostic settings for those resources that support it. See README.md for detainull
workload_identity_enabledboolSpecifies whether Azure AD Workload Identity should be enabled for the Cluster. false
adminslist(object({ kind = strinList of Azure AD object ids that should be able to impersonate admin user.[]
managed_identitieslist(string)List of managed identities where the AKS service principal should have access.[]
azure_policy_enabledboolShould the Azure Policy Add-On be enabled?true
azure_rbac_enabledboolEnable Azure RBAC to control authorizationfalse
oms_agent_log_analytics_workspace_idstringThe ID of the Log Analytics Workspace which the OMS Agent should send data to. inull
cluster_userslist(object({ principal_idList of Azure AD object ids that should be cluster users.[]
storage_contributorlist(string)List of storage account ids where the AKS service principal should have access.[]
oidc_issuer_enabledboolEnable or Disable the OIDC issuer URL. Defaults to falsefalse
tagsmap(string)Tags to apply to all resources created.{}
automatic_channel_upgradestringThe upgrade channel for this Kubernetes Clusternull
linux_profileobject({ username = stringUsername and ssh key for accessing Linux machines with ssh.null
Outputs (3)
id — The Kubernetes Managed Cluster ID.
host — The Kubernetes cluster server host.
identity — The AKs managed identity Object(principal) ID.
Resources (9)
azurerm_kubernetes_clusterazurerm_kubernetes_cluster_node_poolazurerm_monitor_diagnostic_settingazurerm_resource_groupazurerm_role_assignmentazurerm_user_assigned_identitykubernetes_cluster_rolekubernetes_cluster_role_bindingkubernetes_service_account
Details
FrameworkTerraform Module
LanguageHCL
Version6.2.1
Cloud AZURERM
★ Stars20
Forks21
Total downloads7.4k
Inputs27
Outputs3
Resources9
Examples6
LicenseApache-2.0
Namespaceavinor
Updated