You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resource Group exists or is created external to the module.
Provider must be created external to the module.
Usage
# Azure Key Vault and Azure App Config## Usage Varsvariable"resource_group_name" {
description="Name of the resource group"type=string
}
variable"location" {
description="Azure region"type=string
}
variable"tenant_id" {
description="Azure Tenant ID"type=string
}
variable"aks_name" {
type=string
}
variable"aks_sku" {
type=string
}
variable"aks_kubernetes_version" {
type=string
}
variable"aks_system_node_vm_size" {
type=stringdescription="Azure VM size to be used for the system nodes"
}
variable"aks_system_node_disk_size" {
type=numberdescription="Azure disk size to be used for the system nodes"
}
variable"aks_system_node_min_count" {
type=numberdescription="Minimum number of system nodes for autoscaling and before spotting"
}
variable"aks_system_node_max_count" {
type=numberdescription="Maximum number of system nodes for autoscaling"
}
variable"user_node_pools" {
type=list(object({
name =string
os_type =string
vm_size =string
disk_size =number
min_count =number
max_count =number
}))
}
variable"aks_use_spot" {
type=booldescription="Should the user node pools be configured to use spot instances"default=false
}
variable"vnet_name" {
type=string
}
variable"vnet_resource_group_name" {
type=stringdefault="m-spokeconfig-rg"
}
variable"aks_subnet_name" {
type=stringvalidation {
condition=length(var.aks_subnet_name) >0error_message="The aks_subnet_name variable must be supplied"
}
}
variable"tags" {
description="Tags for the resources"type=map(string)
default={}
}
variable"ip_rules" {
description="List of IP addresses that are allowed to access the AKS Cluster"type=list(string)
default=[]
}
# Fluxvariable"flux_enabled" {
description="Enable Flux configuration for the AKS cluster"type=booldefault=false
}
variable"flux_git_repository_url" {
description="Git repository URL for Flux configuration"type=string
}
variable"flux_git_reference_type" {
description="Git reference type for Flux configuration (e.g., branch, tag)"type=stringdefault="branch"
}
variable"flux_git_reference_value" {
description="Git reference value for Flux configuration (e.g., branch name, tag name)"type=stringdefault="main"
}
variable"flux_ssh_private_key_base64" {
description="Base64 encoded SSH private key for Flux Git repository access"type=string
}
variable"flux_git_repository_path" {
description="Path to the Flux Git repository configuration"type=string
}
# PEvariable"pe_enabled" {
description="Enable private endpoint"type=booldefault=true
}
variable"pe_environment" {
description="environment for private endpoint (for example dev | prd | qa | pre)"
}
variable"pe_subnet_name" {
description="subnet name that the private endpoint will associate"
}
variable"dns_resource_group_name" {
description="dns resource group name, please change domain-rg to either business-rg or engineering-rg"
}
variable"dns_zone_group_name" {
description="private dns zone group"
}
variable"dns_zone_name" {
description="alias to create private dns zone - be aware this is dependant on the endpoint"default="privatelink.azurewebsites.net"
}
Example usage:locals {
user_node_pools=[{
name ="linuxpool"
os_type ="Linux"
vm_size = var.aks_linux_node_vm_size
disk_size = var.aks_linux_node_disk_size
min_count = var.aks_linux_node_min_count
max_count = var.aks_linux_node_max_count
}]
}
module"aks" {
source="github.com/UKHO/tfmodule-aks"resource_group_name=azurerm_resource_group.this.namelocation=var.location_primaryaks_name="${local.resource_prefix}-aks"tenant_id=var.tenant_idaks_sku=var.aks_skuaks_kubernetes_version=var.aks_kubernetes_versionaks_system_node_vm_size=var.aks_system_node_vm_sizeaks_system_node_disk_size=var.aks_system_node_disk_sizeaks_system_node_min_count=var.aks_system_node_min_countaks_system_node_max_count=var.aks_system_node_max_countaks_subnet_name=data.azurerm_subnet.spoke-nodes-subnet.namevnet_name=data.azurerm_virtual_network.spoke.nameip_rules=formatlist("%s/32", local.ip_rules)
tags=var.tagsuser_node_pools=[{
name ="linuxpool"
os_type ="Linux"
vm_size = var.aks_linux_node_vm_size
disk_size = var.aks_linux_node_disk_size
min_count = var.aks_linux_node_min_count
max_count = var.aks_linux_node_max_count
}]
flux_enabled=var.flux_enabledflux_git_repository_url=var.flux_git_repository_urlflux_git_reference_value=var.flux_git_repository_branchflux_git_repository_path=var.flux_git_repository_pathflux_ssh_private_key_base64=var.flux_ssh_private_key_base64pe_environment=var.environmentpe_subnet_name=data.azurerm_subnet.spoke-pe-subnet.namedns_resource_group_name=var.dns_resource_groupdns_zone_group_name=var.zone_group
}