-
Notifications
You must be signed in to change notification settings - Fork 10
/
variables.tf
410 lines (342 loc) · 12.4 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
/**
* Copyright (C) 2018-2019 Expedia Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
variable "instance_name" {
description = "Waggle Dance instance name to identify resources in multi-instance deployments."
type = string
default = ""
}
variable "wd_instance_type" {
description = "Waggle Dance instance type, possible values: ecs,k8s."
type = string
default = "ecs"
}
variable "waggledance_version" {
description = "Waggle Dance version to install on EC2 nodes."
type = string
default = "3.11.4"
}
variable "wd_log_level" {
description = "Log level for WaggleDance."
type = string
default = "info"
}
variable "enable_invocation_logs" {
description = "Turns on Waggledance invocation logs in log4j, by default only slow (1 minute+) invocations are logged."
type = bool
default = false
}
variable "enable_autoscaling" {
description = "Enable k8s horizontal pod autoscaling"
type = bool
default = false
}
variable "wd_target_cpu_percentage" {
description = "waggle-dance autoscaling threshold for CPU target usage."
type = number
default = 60
}
variable "cpu_scale_in_cooldown" {
type = number
default = 300
description = "cool down time(seconds) of scale in task by cpu usage"
}
variable "cpu_scale_out_cooldown" {
type = number
default = 120
description = "cool down time(seconds) of scale out task by cpu usage"
}
variable "root_vol_type" {
description = "Waggle Dance EC2 root volume type."
type = string
default = "gp2"
}
variable "root_vol_size" {
description = "Waggle Dance EC2 root volume size."
type = string
default = "10"
}
variable "k8s_namespace" {
description = "K8s namespace to create waggle-dance deployment."
type = string
default = "metastore"
}
variable "aws_region" {
description = "AWS region to use for resources."
type = string
}
variable "wd_ecs_task_count" {
description = "Number of ECS tasks to create."
type = string
default = "1"
}
variable "wd_ecs_max_task_count" {
description = "Max Number of ECS tasks to create."
type = string
default = "10"
}
variable "k8s_replica_count" {
description = "Initial Number of k8s pod replicas to create."
type = number
default = 3
}
variable "k8s_max_replica_count" {
description = "Max Number of k8s pod replicas to create."
type = number
default = 10
}
variable "vpc_id" {
description = "VPC ID."
type = string
}
variable "subnets" {
description = "ECS container subnets."
type = list(string)
}
# Tags
variable "tags" {
description = "A map of tags to apply to resources."
type = map(string)
default = {
Environment = ""
Application = ""
Team = ""
}
}
variable "memory" {
description = <<EOF
The amount of memory (in MiB) used to allocate for the Waggle Dance container.
Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
EOF
type = string
default = "4096"
}
variable "cpu" {
description = <<EOF
The number of CPU units to reserve for the Waggle Dance container.
Valid values can be 256, 512, 1024, 2048 and 4096.
Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
EOF
type = string
default = "1024"
}
variable "ingress_cidr" {
description = "Generally allowed ingress CIDR list."
type = list(string)
}
variable "docker_image" {
description = "Full path Waggle Dance Docker image."
type = string
}
variable "docker_version" {
description = "Waggle Dance Docker image version."
type = string
}
variable "k8s_docker_registry_secret" {
description = "Docker Registry authentication K8s secret name."
type = string
default = ""
}
variable "graphite_host" {
description = "Graphite server configured in Waggle Dance to send metrics to."
type = string
default = "localhost"
}
variable "graphite_port" {
description = "Graphite server port."
type = string
default = "2003"
}
variable "graphite_prefix" {
description = "Prefix addded to all metrics sent to Graphite from this Waggle Dance instance."
type = string
default = "waggle-dance"
}
variable "primary_metastore_host" {
description = "Primary Hive Metastore hostname configured in Waggle Dance."
type = string
default = "localhost"
}
variable "primary_metastore_port" {
description = "Primary Hive Metastore port"
type = string
default = "9083"
}
variable "primary_metastore_read_only_host" {
description = "Optional Primary Hive Metastore READ ONLY hostname configured in Waggle Dance."
type = string
default = ""
}
variable "primary_metastore_read_only_port" {
description = "Optional Primary Hive Metastore READ ONLY port configured in Waggle Dance."
type = string
default = "9083"
}
variable "primary_metastore_glue_account_id" {
description = "Primary metastore Glue AWS account id, optional. Use with 'primary_metastore_glue_endpoint' and instead of 'primary_metastore_host/primary_metastore_port'"
type = string
default = ""
}
variable "primary_metastore_glue_endpoint" {
description = "Primary metastore Glue endpoint 'glue.us-east-1.amazonaws.com', optional. Use with 'primary_metastore_glue_account_id' and instead of 'primary_metastore_host/primary_metastore_port'"
type = string
default = ""
}
variable "primary_metastore_whitelist" {
description = "List of Hive databases to whitelist on primary Metastore."
type = list(string)
default = ["default"]
}
variable "primary_metastore_mapped_databases" {
description = "List of Hive databases mapped from primary Metastore."
type = list(string)
default = []
}
#list of maps, example: [ {host="metastore1", port="9083", prefix="pre1", writable-whitelist="db1,test" }, {host="metastore2", port="9083", prefix="pre2", mapped-databases="dm,test" } ]
variable "local_metastores" {
description = "List of federated Metastore endpoints directly accessible on the local network."
type = list(map(string))
default = []
}
#list of maps, example: [ {endpoint="vpce1", port="9083", prefix="pre1", writable-whitelist="db1,test" }, {endpoint="vpce2", port="9083", prefix="pre2", mapped-databases="dm,test", subnets="subnet1,subnet2" } ]
variable "remote_metastores" {
description = "List of VPC endpoint services to federate Metastores in other accounts."
type = list(map(string))
default = []
}
#list of maps, example: [ {endpoint="vpce1", port="9083", prefix="pre1", writable-whitelist="db1,test", vpc_id = "vpc-123456", subnets = "subnet1,subnet2", security_group_id="sg1" } ]
variable "remote_region_metastores" {
description = "List of VPC endpoint services to federate Metastores in other region,other accounts. The actual data from tables in these metastores can be accessed using Alluxio caching instead of reading the data from S3 directly."
type = list(map(string))
default = []
}
#list of maps, example: [ {bastion-host="10.x.x.x", metastore-host="10.x.x.x", port="9083", prefix="pre1", user="my-unix-user", mapped-databases="test1,test2"}, {bastion-host="10.x.x.x", metastore-host="10.x.x.x", port="9083", prefix="pre2", user="my-unix-user", writable-whitelist="db1,test", mapped-databases="test1,test2"} ]
variable "ssh_metastores" {
description = "List of federated Metastores to connect to over SSH via bastion."
type = list(map(string))
default = []
}
#list of maps, example: [ {glue-account-id="123456789012", glue-endpoint="glue.us-east-1.amazonaws.com", prefix="pre1", mapped-databases="test1,test2"}, {glue-account-id="111111111112", glue-endpoint="glue.us-east-1.amazonaws.com", prefix="pre2", mapped-databases="test1,test2"} ]
variable "glue_metastores" {
description = "List of federated AWS Glue Data Catalogs."
type = list(map(string))
default = []
}
variable "bastion_ssh_key_secret_name" {
description = <<EOF
Secret name in AWS Secrets Manager which stores the private key used to log in to bastions.
The secret's key should be `private_key` and the value should be stored as a base64 encoded string.
Max character limit for a secret's value is 4096.
EOF
type = string
default = ""
}
variable "enable_remote_metastore_dns" {
description = "Option to enable creating DNS records for remote metastores."
type = string
default = ""
}
variable "domain_extension" {
description = "Domain name to use for Route 53 entry and service discovery."
type = string
default = "lcl"
}
variable "secondary_vpcs" {
description = "List of VPCs to associate with Service Discovery namespace."
type = list(string)
default = []
}
variable "docker_registry_auth_secret_name" {
description = "Docker Registry authentication SecretManager secret name."
type = string
default = ""
}
variable "prometheus_enabled" {
description = "Enable to expose the Prometheus endpoint. Also enables Prometheus metrics scraping from k8s pods - true or false."
default = false
type = bool
}
//[ { root_url = "alluxio://alluxio1:19998/", s3_buckets = "bucket1,bucket2" }, { root_url = "alluxio://alluxio2:19998/", s3_buckets = "bucket3,bucket4" } ]
//it is important that root_url contains / at the end for hive hook to create valid url after replacement
variable "alluxio_endpoints" {
type = list(map(string))
default = []
}
variable "default_latency" {
type = number
default = 0
description = "HMS latency (in ms.) that Waggledance will tolerate. See \"latency\" parameter in https://github.com/ExpediaGroup/waggle-dance/blob/main/README.md. This sets the default for all metastores except the primary metastore."
}
variable "primary_metastore_latency" {
type = number
default = 0
description = "HMS latency (in ms.) that Waggledance will tolerate. See \"latency\" parameter in https://github.com/ExpediaGroup/waggle-dance/blob/main/README.md. This sets the latency for the primary metastore only."
}
variable "oidc_provider" {
description = "EKS cluster OIDC provider name, required for configuring IAM using IRSA."
type = string
default = ""
}
variable "enable_query_functions_across_all_metastores" {
default = false
type = bool
description = "See `queryFunctionsAcrossAllMetastores` in https://github.com/ExpediaGroup/waggle-dance/blob/main/README.md, overriding the WaggleDance default as we will get better performance"
}
variable "primary_metastore_access_type" {
description = "Primary metastore access control type."
type = string
default = "READ_AND_WRITE_ON_DATABASE_WHITELIST"
}
variable "datadog_metrics_waggledance" {
description = "WaggleDance metrics to be sent to Datadog."
type = list(string)
default = [
"metastore_status_total*",
"counter_com_hotels_bdp_waggledance_server*",
"jvm_*",
"system_*",
"timer_*"
]
}
variable "metrics_port" {
description = "Port in which metrics will be send for Datadog"
type = string
default = "18000"
}
variable "datadog_metrics_enabled" {
description = "Enable Datadog metrics for HMS"
type = bool
default = false
}
variable "tcp_keepalive_time" {
description = "Sets net.ipv4.tcp_keepalive_time (seconds), currently only supported in ECS."
type = number
default = 200
}
variable "tcp_keepalive_intvl" {
description = "Sets net.ipv4.tcp_keepalive_intvl (seconds), currently only supported in ECS."
type = number
default = 30
}
variable "tcp_keepalive_probes" {
description = "Sets net.ipv4.tcp_keepalive_probes (number), currently only supported in ECS."
type = number
default = 2
}
variable "datadog_key_secret_name" {
description = "Name of the secret containing the DataDog API key. This needs to be created manually in AWS secrets manager. This is only applicable to ECS deployments."
type = string
default = ""
}
variable "datadog_agent_version" {
description = "Version of the Datadog Agent running in the ECS cluster. This is only applicable to ECS deployments."
type = string
default = "7.46.0-jmx"
}
variable "include_datadog_agent" {
description = "Whether to include the datadog-agent container alongside waggledance. This is only applicable to ECS deployments."
type = bool
default = false
}