-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvariables.tf
296 lines (246 loc) · 8.55 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
variable "organization" {
type = string
default = ""
description = "(Optional) Organization abbreviation that will be prefixed to resource names."
}
variable "environment" {
type = string
description = "(Required) Environment name."
}
variable "name" {
type = string
description = "(Required) Name that will be used for identify resources."
}
variable "tags" {
type = map(string)
default = {}
description = "(Optional) Key-value map of resource tags."
}
variable "script_location" {
type = string
description = "(Required) Specifies the S3 path to a script that executes a job."
}
variable "python_version" {
type = number
default = 3
description = "(Optional) The Python version being used to execute a Python shell job."
validation {
condition = contains([2, 3], var.python_version)
error_message = "Allowed values are 2 or 3."
}
}
variable "connections" {
type = list(string)
default = []
description = "(Optional) The list of connections used for this job."
}
variable "description" {
type = string
default = ""
description = "(Optional) Description of the job."
}
variable "max_concurrent_runs" {
type = number
default = 1
description = "(Optional) The maximum number of concurrent runs allowed for a job."
}
variable "glue_version" {
type = string
default = "3.0"
description = "(Optional) The version of glue to use."
}
variable "max_retries" {
type = number
default = 0
description = "(Optional) The maximum number of times to retry this job if it fails."
}
variable "notify_delay_after" {
type = number
default = null
description = "(Optional) After a job run starts, the number of minutes to wait before sending a job run delay notification."
}
variable "role_arn" {
type = string
default = ""
description = "(Optional) The ARN of the IAM role associated with this job."
}
variable "create_role" {
type = bool
default = false
description = "(Optional) Create AWS IAM role associated with the job."
}
variable "timeout" {
type = number
default = 2880
description = "(Optional) The job timeout in minutes."
}
variable "worker_type" {
type = string
default = "G.1X"
description = "(Optional) The type of predefined worker that is allocated when a job runs."
validation {
condition = contains(["Standard", "G.1X", "G.2X"], var.worker_type)
error_message = "Accepts a value of Standard, G.1X, or G.2X."
}
}
variable "number_of_workers" {
type = number
default = 2
description = "(Optional) The number of workers of a defined workerType that are allocated when a job runs."
}
variable "security_configuration" {
type = string
default = ""
description = "(Optional) The name of the Security Configuration to be associated with the job."
}
variable "create_security_configuration" {
type = bool
default = false
description = "(Optional) Create AWS Glue Security Configuration associated with the job."
}
variable "security_configuration_cloudwatch_encryption" {
type = object({
cloudwatch_encryption_mode = string
kms_key_arn = string
})
default = {
cloudwatch_encryption_mode = "DISABLED"
kms_key_arn = null
}
description = "(Optional) A cloudwatch_encryption block which contains encryption configuration for CloudWatch."
}
variable "security_configuration_job_bookmarks_encryption" {
type = object({
job_bookmarks_encryption_mode = string
kms_key_arn = string
})
default = {
job_bookmarks_encryption_mode = "DISABLED"
kms_key_arn = null
}
description = "(Optional) A job_bookmarks_encryption block which contains encryption configuration for job bookmarks."
}
variable "security_configuration_s3_encryption" {
type = object({
s3_encryption_mode = string
kms_key_arn = string
})
default = {
s3_encryption_mode = "DISABLED"
kms_key_arn = null
}
description = "(Optional) A s3_encryption block which contains encryption configuration for S3 data."
}
variable "log_group_retention_in_days" {
type = number
default = 7
description = "(Optional) The default number of days log events retained in the glue job log group."
}
variable "job_language" {
type = string
default = "python"
description = "(Optional) The script programming language."
validation {
condition = contains(["scala", "python"], var.job_language)
error_message = "Accepts a value of 'scala' or 'python'."
}
}
variable "class" {
type = string
default = null
description = "(Optional) The Scala class that serves as the entry point for your Scala script."
}
variable "extra_py_files" {
type = list(string)
default = []
description = "(Optional) The Amazon S3 paths to additional Python modules that AWS Glue adds to the Python path before executing your script."
}
variable "extra_jars" {
type = list(string)
default = []
description = "(Optional) The Amazon S3 paths to additional Java .jar files that AWS Glue adds to the Java classpath before executing your script."
}
variable "user_jars_first" {
type = bool
default = null
description = "(Optional) Prioritizes the customer's extra JAR files in the classpath."
}
variable "use_postgres_driver" {
type = bool
default = null
description = "(Optional) Prioritizes the Postgres JDBC driver in the class path to avoid a conflict with the Amazon Redshift JDBC driver."
}
variable "extra_files" {
type = list(string)
default = []
description = "(Optional) The Amazon S3 paths to additional files, such as configuration files that AWS Glue copies to the working directory of your script before executing it."
}
variable "job_bookmark_option" {
type = string
default = "job-bookmark-disable"
description = "(Optional) Controls the behavior of a job bookmark."
validation {
condition = contains(["job-bookmark-enable", "job-bookmark-disable", "job-bookmark-pause"], var.job_bookmark_option)
error_message = "Accepts a value of 'job-bookmark-enable', 'job-bookmark-disable' or 'job-bookmark-pause'."
}
}
variable "temp_dir" {
type = string
default = null
description = "(Optional) Specifies an Amazon S3 path to a bucket that can be used as a temporary directory for the job."
}
variable "enable_s3_parquet_optimized_committer" {
type = bool
default = true
description = "(Optional) Enables the EMRFS S3-optimized committer for writing Parquet data into Amazon S3."
}
variable "enable_rename_algorithm_v2" {
type = bool
default = true
description = "(Optional) Sets the EMRFS rename algorithm version to version 2."
}
variable "enable_glue_datacatalog" {
type = bool
default = true
description = "(Optional) Enables you to use the AWS Glue Data Catalog as an Apache Spark Hive metastore."
}
variable "enable_metrics" {
type = bool
default = false
description = "(Optional) Enables the collection of metrics for job profiling for job run."
}
variable "enable_continuous_cloudwatch_log" {
type = bool
default = false
description = "(Optional) Enables real-time continuous logging for AWS Glue jobs."
}
variable "enable_continuous_log_filter" {
type = bool
default = true
description = "(Optional) Specifies a standard filter or no filter when you create or edit a job enabled for continuous logging."
}
variable "continuous_log_stream_prefix" {
type = string
default = null
description = "(Optional) Specifies a custom CloudWatch log stream prefix for a job enabled for continuous logging."
}
variable "continuous_log_conversion_pattern" {
type = string
default = null
description = "(Optional) Specifies a custom conversion log pattern for a job enabled for continuous logging."
}
variable "enable_spark_ui" {
type = bool
default = false
description = "(Optional) Enable Spark UI to monitor and debug AWS Glue ETL jobs."
}
variable "spark_event_logs_path" {
type = string
default = null
description = "(Optional) Specifies an Amazon S3 path. When using the Spark UI monitoring feature."
}
variable "additional_python_modules" {
type = list(string)
default = []
description = "(Optional) List of Python modules to add a new module or change the version of an existing module."
}