forked from aws-ia/terraform-aws-eks-blueprints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
242 lines (207 loc) · 6.39 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
/*
* 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 Ids for the worker nodes"
type = list(string)
}
variable "public_subnet_ids" {
description = "List of public subnets Ids for the worker nodes"
type = list(string)
default = []
}
# EKS CONTROL PLANE
variable "create_eks" {
type = bool
default = false
description = "Create EKS cluster"
}
variable "kubernetes_version" {
type = string
default = "1.21"
description = "Desired kubernetes version. If you do not specify a value, the latest available version is used"
}
variable "cluster_name" {
type = string
default = ""
description = "EKS Cluster Name"
}
variable "cluster_kms_key_arn" {
type = string
default = null
description = "A valid EKS Cluster KMS Key ARN to encrypt Kubernetes secrets"
}
variable "cluster_endpoint_private_access" {
type = bool
default = false
description = "Indicates whether or not the EKS private API server endpoint is enabled. Default to EKS resource and it is false"
}
variable "cluster_endpoint_public_access" {
type = bool
default = true
description = "Indicates whether or not the EKS public API server endpoint is enabled. Default to EKS resource and it is true"
}
variable "cluster_log_retention_in_days" {
description = "Number of days to retain log events. Default retention - 90 days."
type = number
default = 90
}
variable "enable_irsa" {
type = bool
default = true
description = "Enable IAM Roles for Service Accounts"
}
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"
}
variable "worker_additional_security_group_ids" {
description = "A list of additional security group ids to attach to worker instances"
type = list(string)
default = []
}
variable "worker_create_security_group" {
description = "Whether to create a security group for the workers or attach the workers to `worker_security_group_id`."
type = bool
default = true
}
# EKS WORKER NODES
variable "managed_node_groups" {
description = "Managed node groups configuration"
type = any
default = {}
}
variable "self_managed_node_groups" {
description = "Self-managed node groups configuration"
type = any
default = {}
}
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)
}
#-----------Amazon Managed Prometheus-------------
variable "enable_amazon_prometheus" {
type = bool
default = false
description = "Enable AWS Managed Prometheus service"
}
variable "amazon_prometheus_workspace_alias" {
type = string
default = null
description = "AWS Managed Prometheus WorkSpace Name"
}
#-----------Amazon EMR on EKS-------------
variable "enable_emr_on_eks" {
type = bool
default = false
description = "Enable EMR on EKS"
}
variable "emr_on_eks_teams" {
description = "EMR on EKS Teams config"
type = any
default = {}
}
#-----------TEAMS-------------
variable "application_teams" {
description = "Map of maps of Application Teams to create"
type = any
default = {}
}
variable "platform_teams" {
description = "Map of maps of platform teams to create"
type = any
default = {}
}