Skip to content

Commit f184d8c

Browse files
committed
terraform fmt
1 parent 5fd363f commit f184d8c

File tree

1 file changed

+44
-26
lines changed

1 file changed

+44
-26
lines changed

variables.tf

+44-26
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
#########################
44

55
variable "cluster_name" {
6+
description = "The name of the Amazon EKS cluster. This is a unique identifier for your EKS cluster within the AWS region."
67
default = "eks-cluster"
78
}
89

910
variable "aws_region" {
11+
description = "AWS region where the EKS cluster will be deployed. This should be set to the region where you want your Kubernetes resources to reside."
1012
default = "us-east-1"
1113
}
1214

1315
variable "k8s_version" {
16+
description = "The version of Kubernetes to use for the EKS cluster. This version should be compatible with the AWS EKS service and other infrastructure components."
1417
default = "1.29"
1518
}
1619

@@ -19,12 +22,14 @@ variable "k8s_version" {
1922
#########################
2023

2124
variable "nodes_instances_sizes" {
25+
description = "A list of EC2 instance types to use for the EKS worker nodes. These instance types should balance between cost, performance, and resource requirements for your workload."
2226
default = [
2327
"t3.large"
2428
]
2529
}
2630

2731
variable "auto_scale_options" {
32+
description = "Configuration for the EKS cluster auto-scaling. It includes the minimum (min), maximum (max), and desired (desired) number of worker nodes."
2833
default = {
2934
min = 4
3035
max = 10
@@ -34,23 +39,24 @@ variable "auto_scale_options" {
3439

3540
variable "cluster_autoscaler_toggle" {
3641
type = bool
37-
description = "Enable Cluster Autoscaler Installation"
42+
description = "Enable or disable the Cluster Autoscaler installation. When true, Cluster Autoscaler is installed to automatically adjust the number of nodes in the cluster."
3843
default = false
3944
}
4045

46+
4147
#########################
4248
### KARPENTER CONFIGS ###
4349
#########################
4450

4551
variable "karpenter_toggle" {
4652
type = bool
47-
description = "Enable Karpenter Installation"
53+
description = "Determines whether Karpenter is enabled for the EKS cluster. Karpenter is an open-source auto-scaler for Kubernetes clusters."
4854
default = true
4955
}
5056

5157
variable "karpenter_instance_family" {
5258
type = list(any)
53-
description = "Instance family list to launch on karpenter"
59+
description = "Defines a list of EC2 instance families to be considered by Karpenter for node provisioning. Instance families like 'c6' and 'c5' offer different compute capabilities."
5460
default = [
5561
"c6",
5662
"c6a",
@@ -60,7 +66,7 @@ variable "karpenter_instance_family" {
6066

6167
variable "karpenter_instance_sizes" {
6268
type = list(any)
63-
description = "Instance sizes to diversify into instance family"
69+
description = "Specifies a list of instance sizes within the chosen instance families to allow diversity in the provisioned nodes by Karpenter."
6470
default = [
6571
"large",
6672
"2xlarge"
@@ -69,15 +75,15 @@ variable "karpenter_instance_sizes" {
6975

7076
variable "karpenter_capacity_type" {
7177
type = list(any)
72-
description = "Capacity Type; Ex spot, on_demand"
78+
description = "Defines the capacity types for provisioning instances in the cluster, such as 'spot' or 'on_demand', offering cost-saving options or consistent availability respectively."
7379
default = [
7480
"spot"
7581
]
7682
}
7783

7884
variable "karpenter_availability_zones" {
7985
type = list(any)
80-
description = "Availability zones to launch nodes"
86+
description = "A list of AWS availability zones where Karpenter should launch nodes. These zones should be in the same region as the EKS cluster."
8187
default = [
8288
"us-east-1a",
8389
"us-east-1b",
@@ -91,81 +97,91 @@ variable "karpenter_availability_zones" {
9197

9298
variable "nlb_ingress_internal" {
9399
type = bool
100+
description = "Indicates whether the Network Load Balancer (NLB) for the EKS cluster should be internal, restricting access to within the AWS network."
94101
default = false
95102
}
96103

97104
variable "nlb_ingress_type" {
98105
type = string
106+
description = "Specifies the type of ingress to be used, such as 'network', determining how the NLB handles incoming traffic to the EKS cluster."
99107
default = "network"
100108
}
101109

102110
variable "proxy_protocol_v2" {
103111
type = bool
112+
description = "Enables or disables Proxy Protocol v2 on the Network Load Balancer, used for preserving client IP addresses and other connection information."
104113
default = false
105114
}
106115

107116
variable "nlb_ingress_enable_termination_protection" {
108117
type = bool
118+
description = "Determines if termination protection is enabled for the Network Load Balancer, preventing accidental deletion."
109119
default = false
110120
}
111121

112122
variable "enable_cross_zone_load_balancing" {
113123
type = bool
124+
description = "Controls whether cross-zone load balancing is enabled for the Network Load Balancer, allowing even traffic distribution across all zones."
114125
default = false
115126
}
116127

128+
117129
#########################
118130
### ROUTE53 CONFIGS ###
119131
#########################
120132

121133
variable "cluster_private_zone" {
122134
type = string
135+
description = "The private DNS zone name for the EKS cluster in AWS Route53. This zone is used for internal DNS resolution within the cluster."
123136
default = "k8s.cluster"
124137
}
125138

126-
127139
#########################
128140
### ISTIO CONFIGS ###
129141
#########################
130142

131143
variable "istio_ingress_min_pods" {
132144
type = number
145+
description = "The minimum number of pods to maintain for the Istio ingress gateway. This ensures basic availability and load handling."
133146
default = 3
134-
description = "Minimum pods for istio-ingress-gateway"
135147
}
136148

137149
variable "istio_ingress_max_pods" {
138150
type = number
151+
description = "The maximum number of pods to scale up for the Istio ingress gateway. This limits the resources used and manages the scaling behavior."
139152
default = 9
140-
description = "Maximum pods for istio-ingress-gateway"
141153
}
142154

143155
#########################
144156
# PROMETHEUS CONFIGS #
145157
#########################
146158

147159
variable "grafana_virtual_service_host" {
148-
type = string
149-
default = "grafana.k8s.raj.ninja"
160+
type = string
161+
description = "The hostname for the Grafana virtual service, used in Istio routing. This host is used to access Grafana dashboards for monitoring metrics."
162+
default = "grafana.k8s.raj.ninja"
150163
}
151164

152165
variable "kiali_virtual_service_host" {
153-
type = string
154-
default = "kiali.k8s.raj.ninja"
166+
type = string
167+
description = "The hostname for the Kiali virtual service, a part of Istio's service mesh visualization. It provides insights into the mesh topology and performance."
168+
default = "kiali.k8s.raj.ninja"
155169
}
156170

157171
variable "jaeger_virtual_service_host" {
158-
type = string
159-
default = "jaeger.k8s.raj.ninja"
172+
type = string
173+
description = "The hostname for the Jaeger virtual service, used for tracing and monitoring microservices within the Istio service mesh."
174+
default = "jaeger.k8s.raj.ninja"
160175
}
161176

162177
###############################
163178
### ARGO-ROLLOUTS CONFIGS ###
164179
###############################
165180

166181
variable "argo_rollouts_virtual_service_host" {
167-
type = string
168-
default = "argo-rollouts.k8s.raj.ninja"
182+
type = string
183+
description = "The hostname for the Argo Rollouts virtual service, used for advanced deployment capabilities like canary and blue-green deployments in Kubernetes."
184+
default = "argo-rollouts.k8s.raj.ninja"
169185
}
170186

171187
#########################
@@ -174,31 +190,31 @@ variable "argo_rollouts_virtual_service_host" {
174190

175191
variable "descheduler_toggle" {
176192
type = bool
177-
description = "Enable Descheduler Installation"
193+
description = "Controls the installation of the Descheduler, a tool to balance and optimize the distribution of Pods across the cluster for improved efficiency."
178194
default = false
179195
}
180196

181197
variable "chaos_mesh_toggle" {
182198
type = bool
183-
description = "Enable Chaos Mesh Installation"
199+
description = "Determines whether to install Chaos Mesh, a cloud-native Chaos Engineering platform that orchestrates chaos experiments on Kubernetes environments."
184200
default = false
185201
}
186202

187203
variable "node_termination_handler_toggle" {
188204
type = bool
189-
description = "Enable AWS Node Termination Handler Setup"
205+
description = "Enables the AWS Node Termination Handler, which ensures that Kubernetes workloads are gracefully handled during EC2 instance terminations or disruptions."
190206
default = true
191207
}
192208

193209
variable "argo_rollouts_toggle" {
194210
type = bool
195-
description = "Enable Argo Rollouts Installation"
211+
description = "Enables the installation of Argo Rollouts, providing advanced deployment strategies like Canary and Blue-Green deployments in Kubernetes."
196212
default = true
197213
}
198214

199215
variable "keda_toggle" {
200216
type = bool
201-
description = "Enable Keda Installation"
217+
description = "Activates the installation of KEDA (Kubernetes Event-Driven Autoscaling), which adds event-driven scaling capabilities to Kubernetes workloads."
202218
default = true
203219
}
204220

@@ -208,29 +224,31 @@ variable "keda_toggle" {
208224

209225
variable "addon_cni_version" {
210226
type = string
211-
description = "VPC CNI Version"
227+
description = "Specifies the version of the AWS VPC CNI (Container Network Interface) plugin to use, which manages the network interfaces for pod networking."
212228
default = "v1.14.1-eksbuild.1"
213229
}
214230

215231
variable "addon_coredns_version" {
216232
type = string
217-
description = "CoreDNS Version"
233+
description = "Defines the version of CoreDNS to use, a DNS server/forwarder that is integral to internal Kubernetes DNS resolution."
218234
default = "v1.11.1-eksbuild.4"
219235
}
220236

221237
variable "addon_kubeproxy_version" {
222238
type = string
223-
description = "Kubeproxy Version"
239+
description = "Sets the version of Kubeproxy to be used, which handles Kubernetes network services like forwarding the requests to correct containers."
224240
default = "v1.29.0-eksbuild.1"
225241
}
226242

227243
variable "addon_csi_version" {
228244
type = string
229-
description = "CSI Version"
245+
description = "Indicates the version of the Container Storage Interface (CSI) driver to use for managing storage volumes in Kubernetes."
230246
default = "v1.26.1-eksbuild.1"
231247
}
232248

233249
variable "default_tags" {
250+
type = map(string)
251+
description = "A map of default tags to apply to all resources. These tags can help with identifying and organizing resources within the AWS environment."
234252
default = {
235253
Environment = "prod"
236254
Foo = "Bar"

0 commit comments

Comments
 (0)