-
Notifications
You must be signed in to change notification settings - Fork 17
/
variables.tf
386 lines (325 loc) · 9.96 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
#Module : LABEL
#Description : Terraform label module variables.
variable "name" {
type = string
default = ""
description = "Name (e.g. `app` or `cluster`)."
}
variable "repository" {
type = string
default = "https://github.com/clouddrove/terraform-aws-elasticsearch"
description = "Terraform current module repo"
validation {
# regex(...) fails if it cannot find a match
condition = can(regex("^https://", var.repository))
error_message = "The module-repo value must be a valid Git repo link."
}
}
variable "environment" {
type = string
default = ""
description = "Environment (e.g. `prod`, `dev`, `staging`)."
}
variable "label_order" {
type = list(any)
default = ["name", "environment"]
description = "Label order, e.g. `name`,`application`."
}
variable "attributes" {
type = list(any)
default = []
description = "Additional attributes (e.g. `1`)."
}
variable "managedby" {
type = string
default = "[email protected]"
description = "ManagedBy, eg 'CloudDrove'."
}
# Module : Elasticsearch Module
# Description : Terraform Elasticsearch Module variables.
variable "enable_iam_service_linked_role" {
type = bool
default = false
description = "Whether to enabled service linked with role."
}
variable "iam_actions" {
type = list(string)
default = []
description = "List of actions to allow for the IAM roles, _e.g._ `es:ESHttpGet`, `es:ESHttpPut`, `es:ESHttpPost`."
}
variable "enabled" {
type = bool
default = true
description = "Set to false to prevent the module from creating any resources."
}
variable "cognito_enabled" {
type = bool
default = true
description = "Set to false to prevent enable cognito."
}
variable "elasticsearch_version" {
type = string
default = "6.5"
description = "Version of Elasticsearch to deploy."
}
variable "instance_type" {
type = string
default = "t2.small.elasticsearch"
description = "Elasticsearch instance type for data nodes in the cluster."
}
variable "user_pool_id" {
type = string
default = ""
description = "ID of the Cognito User Pool to use."
}
variable "identity_pool_id" {
type = string
default = ""
description = "ID of the Cognito Identity Pool to use."
}
variable "instance_count" {
type = number
default = 4
description = "Number of data nodes in the cluster."
}
variable "zone_awareness_enabled" {
type = bool
default = false
description = "Enable zone awareness for Elasticsearch cluster."
}
variable "availability_zone_count" {
type = number
default = 2
description = "Number of Availability Zones for the domain to use."
}
variable "volume_size" {
type = number
default = 0
description = "EBS volumes for data storage in GB."
}
variable "volume_type" {
type = string
default = "gp2"
description = "Storage type of EBS volumes."
}
variable "iops" {
type = number
default = 0
description = "The baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type."
}
variable "encrypt_at_rest_enabled" {
type = bool
default = true
description = "Whether to enable encryption at rest."
}
variable "kms_key_id" {
type = string
default = ""
description = "The KMS key ID to encrypt the Elasticsearch domain with. If not specified, then it defaults to using the AWS/Elasticsearch service KMS key."
sensitive = true
}
variable "cloudwatch_kms_key_id" {
type = string
default = ""
description = "The KMS key ID to encrypt the Cloudwatch logs."
sensitive = true
}
variable "log_publishing_index_enabled" {
type = bool
default = false
description = "Specifies whether log publishing option for INDEX_SLOW_LOGS is enabled or not."
}
variable "log_publishing_search_enabled" {
type = bool
default = false
description = "Specifies whether log publishing option for SEARCH_SLOW_LOGS is enabled or not."
}
variable "log_publishing_application_enabled" {
type = bool
default = false
description = "Specifies whether log publishing option for ES_APPLICATION_LOGS is enabled or not."
}
variable "log_publishing_audit_enabled" {
type = bool
default = true
description = "Specifies whether log publishing option for AUDIT_LOGS is enabled or not."
}
variable "automated_snapshot_start_hour" {
type = number
default = 0
description = "Hour at which automated snapshots are taken, in UTC."
}
variable "retention_in_days" {
type = number
default = 90
description = "Days of retention of cloudwatch."
}
variable "dedicated_master_enabled" {
type = bool
default = false
description = "Indicates whether dedicated master nodes are enabled for the cluster."
}
variable "dedicated_master_count" {
type = number
default = 0
description = "Number of dedicated master nodes in the cluster."
}
variable "dedicated_master_type" {
type = string
default = "t2.small.elasticsearch"
description = "Instance type of the dedicated master nodes in the cluster."
}
variable "advanced_options" {
type = map(string)
default = {}
description = "Key-value string pairs to specify advanced configuration options."
}
variable "encryption_enabled" {
type = bool
default = true
description = "Whether to enable node-to-node encryption."
}
variable "subnet_ids" {
type = list(string)
default = []
description = "Subnet IDs."
sensitive = true
}
variable "security_group_ids" {
type = list(string)
default = []
description = "Security Group IDs."
sensitive = true
}
variable "domain_name" {
type = string
default = ""
description = "Domain name."
}
variable "enable_logs" {
type = bool
default = true
description = "enable logs"
}
variable "dns_enabled" {
type = bool
default = false
description = "Flag to control the dns_enable."
}
variable "dns_zone_id" {
type = string
default = ""
description = "Route53 DNS Zone ID to add hostname records for Elasticsearch domain and Kibana."
sensitive = true
}
variable "es_hostname" {
type = string
default = ""
description = "The Host name of elasticserch."
sensitive = true
}
variable "kibana_hostname" {
type = string
default = ""
description = "The Host name of kibana."
sensitive = true
}
variable "type" {
type = string
default = "CNAME"
description = "Type of DNS records to create."
}
variable "ttl" {
type = string
default = "300"
description = "The TTL of the record to add to the DNS zone to complete certificate validation."
}
variable "enforce_https" {
type = bool
default = true
description = "Whether or not to require HTTPS."
}
variable "tls_security_policy" {
type = string
default = "Policy-Min-TLS-1-0-2019-07"
description = "The name of the TLS security policy that needs to be applied to the HTTPS endpoint."
}
variable "vpc_enabled" {
type = bool
default = true
description = "Set to false if ES should be deployed outside of VPC."
}
variable "advanced_security_options_enabled" {
type = bool
default = false
description = "AWS Elasticsearch Kibana enchanced security plugin enabling (forces new resource)"
}
variable "advanced_security_options_internal_user_database_enabled" {
type = bool
default = false
description = "Whether to enable or not internal Kibana user database for ELK OpenDistro security plugin"
}
variable "advanced_security_options_master_user_arn" {
type = string
default = ""
description = "ARN of IAM user who is to be mapped to be Kibana master user (applicable if advanced_security_options_internal_user_database_enabled set to false)"
}
variable "advanced_security_options_master_user_name" {
type = string
default = ""
description = "Master user username (applicable if advanced_security_options_internal_user_database_enabled set to true)"
}
variable "advanced_security_options_master_user_password" {
type = string
default = ""
description = "Master user password (applicable if advanced_security_options_internal_user_database_enabled set to true)"
}
variable "custom_endpoint_enabled" {
type = bool
description = "Whether to enable custom endpoint for the Elasticsearch domain."
default = false
}
variable "custom_endpoint" {
type = string
description = "Fully qualified domain for custom endpoint."
default = ""
}
variable "custom_endpoint_certificate_arn" {
type = string
description = "ACM certificate ARN for custom endpoint."
default = ""
}
variable "warm_enabled" {
type = bool
default = false
description = "Whether AWS UltraWarm is enabled"
}
variable "warm_count" {
type = number
default = 2
description = "Number of UltraWarm nodes"
}
variable "warm_type" {
type = string
default = "ultrawarm1.medium.elasticsearch"
description = "Type of UltraWarm nodes"
}
variable "allowed_cidr_blocks" {
type = list(string)
default = []
description = "List of CIDR blocks to be allowed to connect to the cluster"
}
variable "auto_tune_desired_state" {
type = string
default = "DISABLED"
description = "Desired state of Auto-Tune for the domain. Valid values are ENABLED, DISABLED."
validation {
condition = can(regex("^ENABLED$|^DISABLED$", var.auto_tune_desired_state))
error_message = "The value must be one of ENABLED, or DISABLED."
}
}
variable "rollback_on_disable" {
type = string
default = "DEFAULT_ROLLBACK"
description = "Whether to roll back to default Auto-Tune settings when disabling Auto-Tune. Valid values: DEFAULT_ROLLBACK or NO_ROLLBACK."
}