-
-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathvariables.tf
486 lines (406 loc) · 17.5 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
374
375
376
377
378
379
380
381
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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
variable "zone_id" {
type = string
description = "Route53 parent zone ID. If provided (not empty), the module will create sub-domain DNS records for the masters and slaves"
default = null
}
variable "use_existing_managed_master_security_group" {
type = bool
description = "If set to `true`, will use variable `managed_master_security_group` using an existing security group that was created outside of this module"
default = false
}
variable "use_existing_managed_slave_security_group" {
type = bool
description = "If set to `true`, will use variable `managed_slave_security_group` using an existing security group that was created outside of this module"
default = false
}
variable "use_existing_additional_master_security_group" {
type = bool
description = "If set to `true`, will use variable `additional_master_security_group` using an existing security group that was created outside of this module"
default = false
}
variable "use_existing_additional_slave_security_group" {
type = bool
description = "If set to `true`, will use variable `additional_slave_security_group` using an existing security group that was created outside of this module"
default = false
}
variable "use_existing_service_access_security_group" {
type = bool
description = "If set to `true`, will use variable `service_access_security_group` using an existing security group that was created outside of this module"
default = false
}
variable "managed_master_security_group" {
type = string
default = ""
description = "The id of the existing managed security group that will be used for EMR master node. If empty, a new security group will be created"
}
variable "managed_slave_security_group" {
type = string
default = ""
description = "The id of the existing managed security group that will be used for EMR core & task nodes. If empty, a new security group will be created"
}
variable "additional_master_security_group" {
type = string
default = ""
description = "The id of the existing additional security group that will be used for EMR master node. If empty, a new security group will be created"
}
variable "additional_slave_security_group" {
type = string
default = ""
description = "The id of the existing additional security group that will be used for EMR core & task nodes. If empty, a new security group will be created"
}
variable "service_access_security_group" {
type = string
default = ""
description = "The id of the existing additional security group that will be used for EMR core & task nodes. If empty, a new security group will be created"
}
variable "master_allowed_security_groups" {
type = list(string)
default = []
description = "List of security group ids to be allowed to connect to the master instances"
}
variable "slave_allowed_security_groups" {
type = list(string)
default = []
description = "List of security group ids to be allowed to connect to the slave instances"
}
variable "master_allowed_cidr_blocks" {
type = list(string)
default = []
description = "List of CIDR blocks to be allowed to access the master instances"
}
variable "slave_allowed_cidr_blocks" {
type = list(string)
default = []
description = "List of CIDR blocks to be allowed to access the slave instances"
}
variable "vpc_id" {
type = string
description = "VPC ID to create the cluster in (e.g. `vpc-a22222ee`)"
}
variable "master_dns_name" {
type = string
description = "Name of the cluster CNAME record to create in the parent DNS zone specified by `zone_id`. If left empty, the name will be auto-asigned using the format `emr-master-var.name`"
default = null
}
variable "termination_protection" {
type = bool
description = "Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false"
default = false
}
variable "keep_job_flow_alive_when_no_steps" {
type = bool
description = "Switch on/off run cluster with no steps or when all steps are complete"
default = true
}
variable "step_concurrency_level" {
type = number
description = "The number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater."
default = null
}
variable "ebs_root_volume_size" {
type = number
description = "Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later"
default = 10
}
variable "custom_ami_id" {
type = string
description = "A custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later"
default = null
}
variable "ec2_role_enabled" {
type = bool
description = "If set to `false`, will use `existing_ec2_instance_profile_arn` for an existing EC2 IAM role that was created outside of this module"
default = true
}
variable "ec2_autoscaling_role_enabled" {
type = bool
description = "If set to `false`, will use `existing_ec2_autoscaling_role_arn` for an existing EC2 autoscaling IAM role that was created outside of this module"
default = true
}
variable "service_role_enabled" {
type = bool
description = "If set to `false`, will use `existing_service_role_arn` for an existing IAM role that was created outside of this module"
default = true
}
variable "enable_ssm_access" {
type = bool
description = "If set to `true`, attach the existing `AmazonSSMManagedInstanceCore` IAM policy to the EMR EC2 instance profile role"
default = false
}
variable "existing_ec2_instance_profile_arn" {
type = string
description = "ARN of an existing EC2 instance profile"
default = ""
}
variable "existing_ec2_autoscaling_role_arn" {
type = string
description = "ARN of an existing EC2 autoscaling role to attach to the cluster"
default = ""
}
variable "existing_service_role_arn" {
type = string
description = "ARN of an existing EMR service role to attach to the cluster"
default = ""
}
variable "visible_to_all_users" {
type = bool
description = "Whether the job flow is visible to all IAM users of the AWS account associated with the job flow"
default = true
}
variable "release_label" {
type = string
description = "The release label for the Amazon EMR release. https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-5x.html"
default = "emr-5.25.0"
}
variable "applications" {
type = list(string)
description = "A list of applications for the cluster. Valid values are: Flink, Ganglia, Hadoop, HBase, HCatalog, Hive, Hue, JupyterHub, Livy, Mahout, MXNet, Oozie, Phoenix, Pig, Presto, Spark, Sqoop, TensorFlow, Tez, Zeppelin, and ZooKeeper (as of EMR 5.25.0). Case insensitive"
}
# https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html
variable "configurations_json" {
type = string
description = "A JSON string for supplying list of configurations for the EMR cluster. See https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html for more details"
default = ""
}
variable "key_name" {
type = string
description = "Amazon EC2 key pair that can be used to ssh to the master node as the user called `hadoop`"
default = null
}
variable "region" {
type = string
description = "AWS region"
}
variable "subnet_id" {
type = string
description = "VPC subnet ID where you want the job flow to launch. Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC"
}
variable "subnet_type" {
type = string
description = "Type of VPC subnet ID where you want the job flow to launch. Supported values are `private` or `public`"
default = "private"
}
variable "route_table_id" {
type = string
description = "Route table ID for the VPC S3 Endpoint when launching the EMR cluster in a private subnet. Required when `subnet_type` is `private`"
default = ""
}
variable "log_uri" {
type = string
description = "The path to the Amazon S3 location where logs for this cluster are stored"
default = null
}
variable "core_instance_group_instance_type" {
type = string
description = "EC2 instance type for all instances in the Core instance group"
}
variable "core_instance_group_instance_count" {
type = number
description = "Target number of instances for the Core instance group. Must be at least 1"
default = 1
}
variable "core_instance_group_ebs_size" {
type = number
description = "Core instances volume size, in gibibytes (GiB)"
}
variable "core_instance_group_ebs_type" {
type = string
description = "Core instances volume type. Valid options are `gp2`, `io1`, `standard` and `st1`"
default = "gp2"
}
variable "core_instance_group_ebs_iops" {
type = number
description = "The number of I/O operations per second (IOPS) that the Core volume supports"
default = null
}
variable "core_instance_group_ebs_volumes_per_instance" {
type = number
description = "The number of EBS volumes with this configuration to attach to each EC2 instance in the Core instance group"
default = 1
}
variable "core_instance_group_bid_price" {
type = string
description = "Bid price for each EC2 instance in the Core instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances"
default = null
}
variable "core_instance_group_autoscaling_policy" {
type = string
description = "String containing the EMR Auto Scaling Policy JSON for the Core instance group"
default = null
}
variable "master_instance_group_instance_type" {
type = string
description = "EC2 instance type for all instances in the Master instance group"
}
variable "master_instance_group_instance_count" {
type = number
description = "Target number of instances for the Master instance group. Must be at least 1"
default = 1
}
variable "master_instance_group_ebs_size" {
type = number
description = "Master instances volume size, in gibibytes (GiB)"
}
variable "master_instance_group_ebs_type" {
type = string
description = "Master instances volume type. Valid options are `gp2`, `io1`, `standard` and `st1`"
default = "gp2"
}
variable "master_instance_group_ebs_iops" {
type = number
description = "The number of I/O operations per second (IOPS) that the Master volume supports"
default = null
}
variable "master_instance_group_ebs_volumes_per_instance" {
type = number
description = "The number of EBS volumes with this configuration to attach to each EC2 instance in the Master instance group"
default = 1
}
variable "master_instance_group_bid_price" {
type = string
description = "Bid price for each EC2 instance in the Master instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances"
default = null
}
variable "scale_down_behavior" {
type = string
description = "The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized"
default = null
}
variable "additional_info" {
type = string
description = "A JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore Terraform cannot detect drift from the actual EMR cluster if its value is changed outside Terraform"
default = null
}
variable "security_configuration" {
type = string
description = "The security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater. See https://www.terraform.io/docs/providers/aws/r/emr_security_configuration.html for more info"
default = null
}
variable "create_task_instance_group" {
type = bool
description = "Whether to create an instance group for Task nodes. For more info: https://www.terraform.io/docs/providers/aws/r/emr_instance_group.html, https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html"
default = false
}
variable "task_instance_group_instance_type" {
type = string
description = "EC2 instance type for all instances in the Task instance group"
default = null
}
variable "task_instance_group_instance_count" {
type = number
description = "Target number of instances for the Task instance group. Must be at least 1"
default = 1
}
variable "task_instance_group_ebs_size" {
type = number
description = "Task instances volume size, in gibibytes (GiB)"
default = 10
}
variable "task_instance_group_ebs_optimized" {
type = bool
description = "Indicates whether an Amazon EBS volume in the Task instance group is EBS-optimized. Changing this forces a new resource to be created"
default = false
}
variable "task_instance_group_ebs_type" {
type = string
description = "Task instances volume type. Valid options are `gp2`, `io1`, `standard` and `st1`"
default = "gp2"
}
variable "task_instance_group_ebs_iops" {
type = number
description = "The number of I/O operations per second (IOPS) that the Task volume supports"
default = null
}
variable "task_instance_group_ebs_volumes_per_instance" {
type = number
description = "The number of EBS volumes with this configuration to attach to each EC2 instance in the Task instance group"
default = 1
}
variable "task_instance_group_bid_price" {
type = string
description = "Bid price for each EC2 instance in the Task instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances"
default = null
}
variable "task_instance_group_autoscaling_policy" {
type = string
description = "String containing the EMR Auto Scaling Policy JSON for the Task instance group"
default = null
}
variable "bootstrap_action" {
type = list(object({
path = string
name = string
args = list(string)
}))
description = "List of bootstrap actions that will be run before Hadoop is started on the cluster nodes"
default = []
}
variable "create_vpc_endpoint_s3" {
type = bool
description = "Set to false to prevent the module from creating VPC S3 Endpoint"
default = true
}
variable "kerberos_enabled" {
type = bool
description = "Set to true if EMR cluster will use kerberos_attributes"
default = false
}
variable "kerberos_ad_domain_join_password" {
type = string
description = "The Active Directory password for ad_domain_join_user. Terraform cannot perform drift detection of this configuration."
default = null
}
variable "kerberos_ad_domain_join_user" {
type = string
description = "Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. Terraform cannot perform drift detection of this configuration."
default = null
}
variable "kerberos_cross_realm_trust_principal_password" {
type = string
description = "Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. Terraform cannot perform drift detection of this configuration."
default = null
}
variable "kerberos_kdc_admin_password" {
type = string
description = "The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. Terraform cannot perform drift detection of this configuration."
default = null
}
variable "kerberos_realm" {
type = string
description = "The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL"
default = "EC2.INTERNAL"
}
variable "steps" {
type = list(object({
name = string
action_on_failure = string
hadoop_jar_step = object({
args = list(string)
jar = string
main_class = string
properties = map(string)
})
}))
description = "List of steps to run when creating the cluster."
default = []
}
variable "emr_role_permissions_boundary" {
type = string
description = "The Permissions Boundary ARN to apply to the EMR Role."
default = ""
}
variable "ec2_role_permissions_boundary" {
type = string
description = "The Permissions Boundary ARN to apply to the EC2 Role."
default = ""
}
variable "ec2_autoscaling_role_permissions_boundary" {
type = string
description = "The Permissions Boundary ARN to apply to the EC2 Autoscaling Role."
default = ""
}
variable "auto_termination_idle_timeout" {
type = string
description = "Auto termination policy idle timeout in seconds (60 - 604800 supported)"
default = null
}