forked from dgozalo/terraform-eks-jx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
300 lines (250 loc) · 6.75 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
variable "cluster_name" {
type = string
default = "existing-cluster"
}
variable "cluster_version" {
description = "Kubernetes version to use for the EKS cluster."
type = string
default = "1.18"
}
# Worker Nodes
variable "desired_node_count" {
type = number
default = 3
}
variable "min_node_count" {
type = number
default = 3
}
variable "max_node_count" {
type = number
default = 5
}
variable "node_machine_type" {
type = string
default = "m5.large"
}
# VPC
variable "vpc_name" {
type = string
default = "tf-vpc-eks"
}
variable "public_subnets" {
type = list(string)
default = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
}
variable "private_subnets" {
type = list(string)
default = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"]
}
variable "vpc_cidr_block" {
type = string
default = "10.0.0.0/16"
}
variable "enable_nat_gateway" {
type = bool
default = false
}
variable "single_nat_gateway" {
type = bool
default = false
}
variable "spot_price" {
description = "The spot price ceiling for spot instances"
type = string
default = "0.1"
}
variable "node_group_ami" {
description = "ami type for the node group worker intances"
type = string
default = "AL2_x86_64"
}
variable "node_group_disk_size" {
description = "node group worker disk size"
type = string
default = "50"
}
variable "key_name" {
description = "The ssh key pair name to use"
type = string
default = ""
}
variable "volume_type" {
description = "The volume type to use. Can be standard, gp2 or io1"
type = string
default = "gp2"
}
variable "volume_size" {
description = "The volume size in GB"
type = number
default = 50
}
variable "iops" {
description = "The IOPS value"
type = number
default = 0
}
// ----------------------------------------------------------------------------
// Flag Variables
// ----------------------------------------------------------------------------
variable "enable_logs_storage" {
type = bool
default = true
}
variable "enable_worker_group" {
description = "Flag to enable worker group. Setting this to false will provision a node group instead"
type = bool
default = true
}
variable "enable_reports_storage" {
type = bool
default = true
}
variable "enable_repository_storage" {
type = bool
default = true
}
variable "force_destroy" {
description = "Flag to determine whether storage buckets get forcefully destroyed. If set to false, empty the bucket first in the aws s3 console, else terraform destroy will fail with BucketNotEmpty error"
type = bool
default = false
}
variable "enable_spot_instances" {
description = "Flag to enable spot instances"
type = bool
default = false
}
variable "cluster_in_private_subnet" {
description = "Flag to enable installation of cluster on private subnets"
type = bool
default = false
}
variable "use_kms_s3" {
description = "Flag to determine whether kms should be used for encrypting s3 buckets"
type = bool
default = false
}
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 "enable_key_name" {
description = "Flag to enable ssh key pair name"
type = bool
default = false
}
variable "s3_kms_arn" {
description = "ARN of the kms key used for encrypting s3 buckets"
type = string
default = ""
}
variable "is_jx2" {
default = true
type = bool
}
variable "content" {
description = "Interpolated jx-requirements.yml"
type = string
default = ""
}
variable "cluster_endpoint_private_access" {
description = "Indicates whether or not the Amazon EKS private API server endpoint is enabled."
type = bool
default = false
}
variable "cluster_endpoint_private_access_cidrs" {
description = "List of CIDR blocks which can access the Amazon EKS private API server endpoint, when public access is disabled."
type = list(string)
default = ["0.0.0.0/0"]
}
variable "cluster_endpoint_public_access" {
description = "Indicates whether or not the Amazon EKS public API server endpoint is enabled."
type = bool
default = true
}
variable "cluster_endpoint_public_access_cidrs" {
description = "List of CIDR blocks which can access the Amazon EKS public API server endpoint."
type = list(string)
default = ["0.0.0.0/0"]
}
variable "allowed_spot_instance_types" {
description = "Allowed machine types for spot instances (must be same size)"
type = any
default = []
}
variable "enable_worker_groups_launch_template" {
description = "Flag to enable Worker Group Launch Templates"
type = bool
default = false
}
variable "lt_desired_nodes_per_subnet" {
description = "The number of worker nodes in each Subnet (AZ) if using Launch Templates"
type = number
default = 1
}
variable "lt_min_nodes_per_subnet" {
description = "The minimum number of worker nodes in each Subnet (AZ) if using Launch Templates"
type = number
default = 1
}
variable "lt_max_nodes_per_subnet" {
description = "The maximum number of worker nodes in each Subnet (AZ) if using Launch Templates"
type = number
default = 2
}
variable "jx_git_url" {
description = "URL for the Jenins X cluster git repository"
type = string
default = ""
}
variable "jx_bot_username" {
description = "Bot username used to interact with the Jenkins X cluster git repository"
type = string
default = ""
}
variable "jx_bot_token" {
description = "Bot token used to interact with the Jenkins X cluster git repository"
type = string
default = ""
}
variable "create_eks" {
description = "Controls if EKS cluster and associated resources should be created or not. If you have an existing eks cluster, set it to false"
type = bool
default = true
}
variable "create_vpc" {
description = "Controls if VPC and related resources should be created"
type = bool
default = true
}
variable "region" {
type = string
default = "us-east-2"
}
variable "use_vault" {
type = bool
default = false
}
variable "use_asm" {
type = bool
default = true
}