1+ variable "location" {
2+ description = " Azure region where resources will be created"
3+ type = string
4+ default = " eastus"
5+ }
6+
7+ variable "cluster_name" {
8+ description = " Name of the AKS cluster (will generate one if empty)"
9+ type = string
10+ }
11+
12+ variable "environment" {
13+ description = " Environment for the resources (e.g., dev, test, prod)"
14+ type = string
15+ default = " dev"
16+ }
17+
18+ variable "tags" {
19+ description = " A map of tags to add to all resources"
20+ type = map (string )
21+ default = {}
22+ }
23+
24+ variable "kubernetes_version" {
25+ description = " Kubernetes version to use for the AKS cluster"
26+ type = string
27+ default = " 1.31.6"
28+ }
29+
30+ variable "vm_size" {
31+ description = " VM size for the AKS node pool"
32+ type = string
33+ default = " Standard_DS2_v2"
34+ }
35+
36+ variable "enable_auto_scaling" {
37+ description = " Enable auto scaling for the AKS node pool"
38+ type = bool
39+ default = true
40+ }
41+
42+ variable "min_count" {
43+ description = " Minimum number of nodes in the AKS node pool"
44+ type = number
45+ default = 1
46+ }
47+
48+ variable "max_count" {
49+ description = " Maximum number of nodes in the AKS node pool"
50+ type = number
51+ default = 3
52+ }
53+
54+ variable "vnet_address_space" {
55+ description = " Address space for the virtual network"
56+ type = list (string )
57+ default = [" 10.0.0.0/16" ]
58+ }
59+
60+ variable "subnet_address_prefixes" {
61+ description = " Address prefixes for the subnets (requires 3 subnets for nodes, private, and DNS resolver)"
62+ type = list (string )
63+ default = [" 10.0.1.0/24" , " 10.0.2.0/24" , " 10.0.3.0/24" ]
64+ }
65+
66+ variable "service_cidr" {
67+ description = " CIDR range for Kubernetes services"
68+ type = string
69+ default = " 172.16.0.0/16"
70+ }
71+
72+ variable "dns_service_ip" {
73+ description = " IP address for Kubernetes DNS service (must be within service_cidr)"
74+ type = string
75+ default = " 172.16.0.10"
76+ }
77+
78+ variable "docker_bridge_cidr" {
79+ description = " CIDR notation IP for Docker bridge"
80+ type = string
81+ default = " 172.17.0.1/16"
82+ }
83+
84+ variable "availability_zones" {
85+ description = " List of availability zones to use for the node pool"
86+ type = list (number )
87+ default = [1 , 2 , 3 ]
88+ }
89+
90+ variable "os_disk_size_gb" {
91+ description = " Disk size for nodes in GB"
92+ type = number
93+ default = 50
94+ }
95+
96+ variable "os_disk_type" {
97+ description = " Disk type for nodes"
98+ type = string
99+ default = " Managed"
100+ }
101+
102+ variable "node_labels" {
103+ description = " Labels to apply to nodes in the default node pool"
104+ type = map (string )
105+ default = {}
106+ }
107+
108+ variable "enable_log_analytics_workspace" {
109+ description = " Enable the creation of a Log Analytics workspace for the AKS cluster"
110+ type = bool
111+ default = false
112+ }
113+
114+ variable "log_retention_in_days" {
115+ description = " Number of days to retain logs in Log Analytics"
116+ type = number
117+ default = 30
118+ }
0 commit comments