forked from aws-ia/terraform-aws-eks-blueprints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
373 lines (365 loc) · 10.9 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: MIT-0
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
# CLUSTER LABELS
variable "org" {
type = string
description = "tenant, which could be your organization name, e.g. aws'"
default = ""
}
variable "tenant" {
type = string
description = "Account Name or unique account unique id e.g., apps or management or aws007"
default = "aws"
}
variable "environment" {
type = string
default = "preprod"
description = "Environment area, e.g. prod or preprod "
}
variable "zone" {
type = string
description = "zone, e.g. dev or qa or load or ops etc..."
default = "dev"
}
variable "tags" {
type = map(string)
default = {}
description = "Additional tags (e.g. `map('BusinessUnit`,`XYZ`)"
}
variable "terraform_version" {
type = string
default = "Terraform"
description = "Terraform Version"
}
# VPC Config for EKS Cluster
variable "vpc_id" {
type = string
description = "VPC id"
}
variable "private_subnet_ids" {
description = "list of private subnets Id's for the Worker nodes"
type = list(string)
}
variable "public_subnet_ids" {
description = "list of private subnets Id's for the Worker nodes"
type = list(string)
default = []
}
# EKS CONTROL PLANE
variable "create_eks" {
type = bool
default = false
description = "Enable Create EKS"
}
variable "kubernetes_version" {
type = string
default = "1.21"
description = "Desired Kubernetes master version. If you do not specify a value, the latest available version is used"
}
variable "cluster_endpoint_private_access" {
type = bool
default = false
description = "Indicates whether or not the Amazon EKS private API server endpoint is enabled. Default to AWS EKS resource and it is false"
}
variable "cluster_endpoint_public_access" {
type = bool
default = true
description = "Indicates whether or not the Amazon EKS public API server endpoint is enabled. Default to AWS EKS resource and it is true"
}
variable "enable_irsa" {
type = bool
default = true
description = "Indicates whether or not the Amazon EKS public API server endpoint is enabled. Default to AWS EKS resource and it is true"
}
variable "cluster_enabled_log_types" {
type = list(string)
default = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
description = "A list of the desired control plane logging to enable"
}
variable "cluster_log_retention_period" {
type = number
default = 7
description = "Number of days to retain cluster logs"
}
# EKS MANAGED ADDONS
variable "enable_vpc_cni_addon" {
type = bool
default = false
description = "Enable VPC CNI Addon"
}
variable "enable_coredns_addon" {
type = bool
default = false
description = "Enable CoreDNS Addon"
}
variable "enable_kube_proxy_addon" {
type = bool
default = false
description = "Enable Kube Proxy Addon"
}
variable "vpc_cni_addon_version" {
type = string
default = "v1.8.0-eksbuild.1"
description = "VPC CNI Addon version"
}
variable "coredns_addon_version" {
type = string
default = "v1.8.3-eksbuild.1"
description = "CoreDNS Addon version"
}
variable "kube_proxy_addon_version" {
type = string
default = "v1.20.4-eksbuild.2"
description = "KubeProxy Addon version"
}
# EKS WORKER NODES
variable "enable_managed_nodegroups" {
description = "Enable self-managed worker groups"
type = bool
default = false
}
variable "managed_node_groups" {
description = "Managed Node groups configuration"
type = any
default = {}
}
variable "enable_self_managed_nodegroups" {
description = "Enable self-managed worker groups"
type = bool
default = false
}
variable "self_managed_node_groups" {
description = "Self-Managed Node groups configuration"
type = any
default = {}
}
variable "enable_fargate" {
description = "Enable Fargate profiles"
type = bool
default = false
}
variable "fargate_profiles" {
description = "Fargate Profile configuration"
type = any
default = {}
}
# EKS WINDOWS SUPPORT
variable "enable_windows_support" {
description = "Enable Windows support"
type = bool
default = false
}
# CONFIGMAP AWS-AUTH
variable "map_accounts" {
description = "Additional AWS account numbers to add to the aws-auth configmap. "
type = list(string)
default = []
}
variable "map_roles" {
description = "Additional IAM roles to add to the aws-auth configmap."
type = list(object({
rolearn = string
username = string
groups = list(string)
}))
default = []
}
variable "map_users" {
description = "Additional IAM users to add to the aws-auth configmap. "
type = list(object({
userarn = string
username = string
groups = list(string)
}))
default = []
}
variable "aws_auth_additional_labels" {
description = "Additional kubernetes labels applied on aws-auth ConfigMap"
default = {}
type = map(string)
}
# KUBERNETES ADDONS VARIABLES
variable "enable_emr_on_eks" {
type = bool
default = false
description = "Enabling EMR on EKS Config"
}
variable "emr_on_eks_teams" {
description = "EMR on EKS Teams configuration"
type = any
default = {}
}
#-----------CLUSTER AUTOSCALER-------------
variable "cluster_autoscaler_enable" {
type = bool
default = false
description = "Enabling Cluster autoscaler on eks cluster"
}
variable "cluster_autoscaler_helm_chart" {
type = any
default = {}
description = "Cluster Autoscaler Helm Chart Config"
}
#-----------PROMETHEUS-------------
variable "aws_managed_prometheus_enable" {
type = bool
default = false
description = "Enable AWS Managed Prometheus service"
}
variable "aws_managed_prometheus_workspace_name" {
type = string
default = "aws-managed-prometheus-workspace"
description = "AWS Managed Prometheus WorkSpace Name"
}
variable "prometheus_enable" {
description = "Enable Community Prometheus Helm Addon"
type = bool
default = false
}
variable "prometheus_helm_chart" {
description = "Community Prometheus Helm Addon Config"
type = any
default = {}
}
#-----------METRIC SERVER-------------
variable "metrics_server_enable" {
type = bool
default = false
description = "Enabling metrics server on eks cluster"
}
variable "metrics_server_helm_chart" {
type = any
default = {}
description = "Metrics Server Helm Addon Config"
}
#-----------TRAEFIK-------------
variable "traefik_ingress_controller_enable" {
type = bool
default = false
description = "Enabling Traefik Ingress Controller on eks cluster"
}
variable "traefik_helm_chart" {
type = any
default = {}
description = "Traefik Helm Addon Config"
}
#-----------AGONES-------------
variable "agones_enable" {
type = bool
default = false
description = "Enabling Agones Gaming Helm Chart"
}
variable "agones_helm_chart" {
type = any
default = {}
description = "Agones GameServer Helm chart config"
}
#-----------AWS LB Ingress Controller-------------
variable "aws_lb_ingress_controller_enable" {
type = bool
default = false
description = "enabling LB Ingress Controller on eks cluster"
}
variable "aws_lb_ingress_controller_helm_app" {
type = any
description = "Helm chart definition for aws_lb_ingress_controller"
default = {}
}
#-----------NGINX-------------
variable "nginx_ingress_controller_enable" {
type = bool
default = false
description = "Enabling NGINX Ingress Controller on EKS Cluster"
}
variable "nginx_helm_chart" {
description = "NGINX Ingress Controller Helm Chart Configuration"
type = any
default = {}
}
#-----------SPARK K8S OPERATOR-------------
variable "spark_on_k8s_operator_enable" {
type = bool
default = false
description = "Enabling Spark on K8s Operator on EKS Cluster"
}
variable "spark_on_k8s_operator_helm_chart" {
description = "Spark on K8s Operator Helm Chart Configuration"
type = any
default = {}
}
#-----------AWS FOR FLUENT BIT-------------
variable "aws_for_fluentbit_enable" {
type = bool
default = false
description = "Enabling FluentBit Addon on EKS Worker Nodes"
}
variable "aws_for_fluentbit_helm_chart" {
type = any
description = "Helm chart definition for aws_for_fluent_bit"
default = {}
}
#-----------FARGATE FLUENT BIT-------------
variable "fargate_fluentbit_enable" {
type = bool
default = false
description = "Enabling fargate_fluent_bit module on eks cluster"
}
variable "fargate_fluentbit_config" {
type = any
description = "Fargate fluentbit configuration "
default = {}
}
#-----------CERT MANAGER-------------
variable "cert_manager_enable" {
type = bool
default = false
description = "Enabling Cert Manager Helm Chart installation. It is automatically enabled if Windows support is enabled."
}
variable "cert_manager_helm_chart" {
type = any
description = "Cert Manager Helm chart configuration"
default = {}
}
#------WINDOWS VPC CONTROLLERS-------------
variable "windows_vpc_controllers_helm_chart" {
type = any
description = "Windows VPC Controllers Helm chart configuration"
default = {}
}
#-----------AWS OPEN TELEMETRY ADDON-------------
variable "aws_open_telemetry_enable" {
type = bool
default = false
description = "Enable AWS Open Telemetry Distro Addon "
}
variable "aws_open_telemetry_addon" {
type = any
default = {}
description = "AWS Open Telemetry Distro Addon Configuration"
}
#-----------ARGOCD ADDON-------------
variable "argocd_enable" {
type = bool
default = false
description = "Enable ARGO CD Kubernetes Addon"
}
variable "argocd_helm_chart" {
type = any
default = {}
description = "ARGO CD Kubernetes Addon Configuration"
}