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