Newer
Older
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
/*
* 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.
*/
variable "terraform_version" {
type = string
default = "Terraform"
description = "Terraform Version"
}
variable "org" {
type = string
description = "tenant, which could be your organization name, e.g. aws'"
default = "aws"
}
variable "tenant" {
type = string
description = "Account Name or unique account unique id e.g., apps or management or aws007"
default = ""
}
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 = ""
}
variable "attributes" {
type = string
default = ""
description = "Additional attributes (e.g. `1`)"
}
variable "tags" {
type = map(string)
default = {}
description = "Additional tags (e.g. `map('BusinessUnit`,`XYZ`)"
}
#----------------------------------------------------------
// VPC
#----------------------------------------------------------
variable "create_vpc" {
description = "Controls if VPC should be created (it affects almost all resources)"
type = bool
default = false
}
variable "enable_public_subnets" {
description = "Enable public subnets for EKS Cluster"
type = bool
default = false
}
variable "enable_nat_gateway" {
description = "Enable NAT Gateway for public subnets"
type = bool
default = false
}
variable "single_nat_gateway" {
description = "Create single NAT gateway for all private subnets"
type = bool
default = true
}
variable "create_igw" {
description = "Create internet gateway in public subnets"
type = bool
default = false
}

Vara Bonthu
committed
variable "enable_private_subnets" {
description = "Enable private subnets for EKS Cluster"
type = bool
default = true
}
variable "vpc_id" {
type = string
description = "VPC id"
default = ""
}

Vara Bonthu
committed
variable "private_subnet_ids" {
description = "list of private subnets Id's for the Worker nodes"
default = []
}
variable "public_subnet_ids" {
description = "list of private subnets Id's for the Worker nodes"
default = []
}
variable "vpc_cidr_block" {
type = string
default = ""
description = "VPC CIDR"
}
variable "public_subnets_cidr" {
description = "list of Public subnets for the Worker nodes"
default = []
}
variable "private_subnets_cidr" {
description = "list of Private subnets for the Worker nodes"
default = []
}
variable "create_vpc_endpoints" {
type = bool
default = false
description = "Create VPC endpoints for Private subnets"
}
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
variable "endpoint_private_access" {
type = bool
default = true
description = "Indicates whether or not the Amazon EKS private API server endpoint is enabled. Default to AWS EKS resource and it is false"
}
variable "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"
}
#----------------------------------------------------------
// EKS CONTROL PLANE
#----------------------------------------------------------
variable "kubernetes_version" {
type = string
default = "1.19"
description = "Desired Kubernetes master version. If you do not specify a value, the latest available version is used"
}
variable "enabled_cluster_log_types" {
type = list(string)
default = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
description = "A list of the desired control plane logging to enable. Possible values [`api`, `audit`, `authenticator`, `controllerManager`, `scheduler`]"
}
variable "cluster_log_retention_period" {
type = number
default = 7
description = "Number of days to retain cluster logs. Requires `enabled_cluster_log_types` to be set. See https://docs.aws.amazon.com/en_us/eks/latest/userguide/control-plane-logs.html."
}
variable "map_additional_aws_accounts" {
description = "Additional AWS account numbers to add to `config-map-aws-auth` ConfigMap"
type = list(string)
default = []
}
variable "map_additional_iam_roles" {
description = "Additional IAM roles to add to `config-map-aws-auth` ConfigMap"
type = list(object({
rolearn = string
username = string
groups = list(string)
}))
default = []
}
variable "map_additional_iam_users" {
description = "Additional IAM users to add to `config-map-aws-auth` ConfigMap"
type = list(object({
userarn = string
username = string
groups = list(string)
}))
default = []
}
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
variable "vpc_cni_addon_version" {
type = string
default = "v1.8.0-eksbuild.1"
description = "VPC CNI Addon verison"
}
variable "coredns_addon_version" {
type = string
default = "v1.8.3-eksbuild.1"
description = "CoreDNS Addon verison"
}
variable "kube_proxy_addon_version" {
type = string
default = "v1.20.4-eksbuild.2"
description = "KubeProxy Addon verison"
}
variable "enable_vpc_cni_addon" {
type = bool
default = false
}
variable "enable_coredns_addon" {
type = bool
default = false
}
variable "enable_kube_proxy_addon" {
type = bool
default = false
}
#----------------------------------------------------------
// EKS WORKER NODES
#----------------------------------------------------------
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
variable "bottlerocket_ami" {
type = string
default = "ami-0326716ad575410ab"
description = "/aws/service/bottlerocket/aws-k8s-1.19/x86_64/latest/image_id"
}
variable "bottlerocket_node_group_name" {
type = string
default = "mg-m5-bottlerocket"
description = "AWS eks managed node group name"
}
variable "bottlerocket_disk_size" {
type = number
default = 50
description = "Disk size in GiB for worker nodes. Defaults to 20. Terraform will only perform drift detection if a configuration value is provided"
}
variable "bottlerocket_instance_type" {
type = list(string)
default = ["m5.large"]
description = "Set of instance types associated with the EKS Node Group"
}
variable "bottlerocket_desired_size" {
type = number
default = 3
description = "Desired number of worker nodes"
}
variable "bottlerocket_max_size" {
type = number
default = 3
description = "The maximum size of the AutoScaling Group"
}
variable "bottlerocket_min_size" {
type = number
default = 3
description = "The minimum size of the AutoScaling Group"
}
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
variable "on_demand_node_group_name" {
type = string
default = "mg-m5-on-demand"
description = "AWS eks managed node group name"
}
variable "on_demand_ami_type" {
type = string
default = "AL2_x86_64"
description = "AWS eks managed worker nodes AMI type"
}
variable "on_demand_disk_size" {
type = number
default = 50
description = "Disk size in GiB for worker nodes. Defaults to 20. Terraform will only perform drift detection if a configuration value is provided"
}
variable "on_demand_instance_type" {
type = list(string)
default = ["m5.large"]
description = "Set of instance types associated with the EKS Node Group"
}
variable "on_demand_desired_size" {
type = number
default = 3
description = "Desired number of worker nodes"
}
variable "on_demand_max_size" {
type = number
default = 3
description = "The maximum size of the AutoScaling Group"
}
variable "on_demand_min_size" {
type = number
default = 3
description = "The minimum size of the AutoScaling Group"
}
variable "spot_node_group_name" {
type = string
default = "mg-m5-spot"
description = "AWS eks managed node group for spot"
}
variable "spot_ami_type" {
type = string
default = "AL2_x86_64"
description = "AWS eks managed worker nodes AMI type"
}
variable "spot_instance_type" {
type = list(string)
default = ["m5.large"]
description = "Set of instance types associated with the EKS Node Group. Defaults to [\"t3.medium\"]. Terraform will only perform drift detection if a configuration value is provided"
}
variable "spot_desired_size" {
type = number
default = 3
description = "Desired number of worker nodes"
}
variable "spot_max_size" {
type = number
default = 3
description = "The maximum size of the AutoScaling Group"
}
variable "spot_min_size" {
type = number
default = 1
description = "The minimum size of the AutoScaling Group"
}
variable "kubernetes_labels" {
type = map(string)
description = "Key-value mapping of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed"
default = {}
}
variable "fargate_profile_namespace" {
type = string
default = "default"
description = "AWS fargate profile Namespace"
}
variable "metrics_server_enable" {
type = bool
description = "Enabling metrics server on eks cluster"
}
variable "cluster_autoscaler_enable" {
type = bool
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
description = "Enabling Cluster autoscaler on eks cluster"
}
variable "traefik_ingress_controller_enable" {
type = bool
default = false
description = "Enabling Traefik Ingress Controller on eks cluster"
}
variable "lb_ingress_controller_enable" {
type = bool
default = false
description = "enabling LB Ingress Controller on eks cluster"
}
variable "aws_for_fluent_bit_enable" {
type = bool
default = false
description = "Enabling aws_fluent_bit module on eks cluster"
}
variable "fargate_fluent_bit_enable" {
type = bool
default = false
description = "Enabling fargate_fluent_bit module on eks cluster"
}
variable "ekslog_retention_in_days" {
default = 90
description = "Number of days to retain log events. Default retention - 90 days."
type = number
}
variable "public_docker_repo" {
type = bool
default = true
description = "public docker repo access"
}

Vara Bonthu
committed
variable "agones_enable" {
type = bool
default = false
description = "Enabling Agones Gaming Helm Chart"
}

Vara Bonthu
committed
variable "expose_udp" {
type = bool
default = false
description = "Enabling Agones Gaming Helm Chart"
}
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
variable "aws_lb_image_tag" {
default = "v2.2.1"
}
variable "aws_lb_helm_chart_version" {
default = "1.2.3"
}
variable "metric_server_image_tag" {
}
variable "metric_server_helm_chart_version" {
}
variable "cluster_autoscaler_image_tag" {
}
variable "cluster_autoscaler_helm_version" {
}
variable "prometheus_helm_chart_version" {
}
variable "prometheus_image_tag" {
}
variable "alert_manager_image_tag" {
}
variable "configmap_reload_image_tag" {
}
variable "node_exporter_image_tag" {
}
variable "pushgateway_image_tag" {
}
variable "prometheus_enable" {
default = false
}
variable "aws_managed_prometheus_enable" {
default = false
}
variable "traefik_helm_chart_version" {
}
variable "traefik_image_tag" {
}
variable "aws_for_fluent_bit_image_tag" {
default = "2.13.0"
description = "Docker image tag for aws_for_fluent_bit"
}
variable "aws_for_fluent_bit_helm_chart_version" {
default = "0.1.11"
description = "Helm chart version for aws_for_fluent_bit"