forked from lgallard/terraform-aws-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
390 lines (326 loc) · 11 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
#
# AWS ElasticSearch
#
variable "domain_name" {
description = "Name of the domain"
type = string
}
variable "elasticsearch_version" {
description = "The version of Elasticsearch to deploy."
type = string
default = "7.1"
}
variable "access_policies" {
description = "IAM policy document specifying the access policies for the domain"
type = string
default = ""
}
variable "enabled" {
description = "Change to false to avoid deploying any AWS ElasticSearch resources"
type = bool
default = true
}
variable "cloudwatch_log_enabled" {
description = "Change to false to avoid deploying any Cloudwatch Logs resources"
type = bool
default = true
}
# Advanced security options
variable "advanced_security_options" {
description = "Options for fine-grained access control"
type = any
default = {}
}
variable "advanced_security_options_enabled" {
description = "Whether advanced security is enabled (Forces new resource)"
type = bool
default = false
}
variable "advanced_security_options_internal_user_database_enabled" {
description = "Whether the internal user database is enabled. If not set, defaults to false by the AWS API."
type = bool
default = false
}
variable "advanced_security_options_master_user_arn" {
description = "ARN for the master user. Only specify if `internal_user_database_enabled` is not set or set to `false`)"
type = string
default = null
}
variable "advanced_security_options_master_user_username" {
description = "The master user's username, which is stored in the Amazon Elasticsearch Service domain's internal database. Only specify if `internal_user_database_enabled` is set to `true`."
type = string
default = null
}
variable "advanced_security_options_master_user_password" {
description = "The master user's password, which is stored in the Amazon Elasticsearch Service domain's internal database. Only specify if `internal_user_database_enabled` is set to `true`."
type = string
default = null
}
variable "advanced_security_options_create_random_master_password" {
description = "Whether to create random master password for Elasticsearch master user"
type = bool
default = false
}
variable "advanced_security_options_random_master_password_length" {
description = "Length of random master password to create"
type = number
default = 16
}
# Domain endpoint options
variable "domain_endpoint_options" {
description = "Domain endpoint HTTP(S) related options."
type = any
default = {}
}
variable "domain_endpoint_options_enforce_https" {
description = "Whether or not to require HTTPS"
type = bool
default = false
}
variable "domain_endpoint_options_tls_security_policy" {
description = "The name of the TLS security policy that needs to be applied to the HTTPS endpoint. Valid values: `Policy-Min-TLS-1-0-2019-07` and `Policy-Min-TLS-1-2-2019-07`"
type = string
default = "Policy-Min-TLS-1-2-2019-07"
}
variable "domain_endpoint_options_custom_endpoint_enabled" {
description = "Whether to enable custom endpoint for the Elasticsearch domain"
type = bool
default = false
}
variable "domain_endpoint_options_custom_endpoint" {
description = "Fully qualified domain for your custom endpoint"
type = string
default = null
}
variable "domain_endpoint_options_custom_endpoint_certificate_arn" {
description = "ACM certificate ARN for your custom endpoint"
type = string
default = null
}
# Advanced options
variable "advanced_options" {
description = "Key-value string pairs to specify advanced configuration options. Note that the values for these configuration options must be strings (wrapped in quotes) or they may be wrong and cause a perpetual diff, causing Terraform to want to recreate your Elasticsearch domain on every apply"
type = map(string)
default = {}
}
# ebs_options
variable "ebs_options" {
description = "EBS related options, may be required based on chosen instance size"
type = any
default = {}
}
variable "ebs_enabled" {
description = "Whether EBS volumes are attached to data nodes in the domain"
type = bool
default = true
}
variable "ebs_options_volume_type" {
description = "The type of EBS volumes attached to data nodes"
type = string
default = "gp2"
}
variable "ebs_options_volume_size" {
description = "The size of EBS volumes attached to data nodes (in GB). Required if ebs_enabled is set to true"
type = number
default = 10
}
variable "ebs_options_iops" {
description = "The baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type"
type = number
default = 0
}
# encrypt_at_rest
variable "encrypt_at_rest" {
description = "Encrypt at rest options. Only available for certain instance types"
type = any
default = {}
}
variable "encrypt_at_rest_enabled" {
description = "Whether to enable encryption at rest"
type = bool
default = true
}
variable "encrypt_at_rest_kms_key_id" {
description = "The KMS key id to encrypt the Elasticsearch domain with. If not specified then it defaults to using the aws/es service KMS key"
type = string
default = "alias/aws/es"
}
# node_to_node_encryption
variable "node_to_node_encryption" {
description = "Node-to-node encryption options"
type = any
default = {}
}
variable "node_to_node_encryption_enabled" {
description = "Whether to enable node-to-node encryption"
type = bool
default = true
}
# cluster_config
variable "cluster_config" {
description = "Cluster configuration of the domain"
type = any
default = {}
}
variable "cluster_config_instance_type" {
description = "Instance type of data nodes in the cluster"
type = string
default = "r5.large.elasticsearch"
}
variable "cluster_config_instance_count" {
description = "Number of instances in the cluster"
type = number
default = 3
}
variable "cluster_config_dedicated_master_enabled" {
description = "Indicates whether dedicated master nodes are enabled for the cluster"
type = bool
default = true
}
variable "cluster_config_dedicated_master_type" {
description = "Instance type of the dedicated master nodes in the cluster"
type = string
default = "r5.large.elasticsearch"
}
variable "cluster_config_dedicated_master_count" {
description = "Number of dedicated master nodes in the cluster"
type = number
default = 3
}
variable "cluster_config_availability_zone_count" {
description = "Number of Availability Zones for the domain to use with"
type = number
default = 3
}
variable "cluster_config_zone_awareness_enabled" {
description = "Indicates whether zone awareness is enabled. To enable awareness with three Availability Zones"
type = bool
default = false
}
variable "cluster_config_warm_enabled" {
description = "Indicates whether to enable warm storage"
type = bool
default = false
}
variable "cluster_config_warm_count" {
description = "The number of warm nodes in the cluster"
type = number
default = null
}
variable "cluster_config_warm_type" {
description = "The instance type for the Elasticsearch cluster's warm nodes"
type = string
default = null
}
variable "cluster_config_cold_storage_options_enabled" {
description = "Indicates whether to enable cold storage for an Elasticsearch domain"
type = bool
default = false
}
# snapshot_options
variable "snapshot_options" {
description = "Snapshot related options"
type = any
default = {}
}
variable "snapshot_options_automated_snapshot_start_hour" {
description = "Hour during which the service takes an automated daily snapshot of the indices in the domain"
type = number
default = 0
}
# auto_tune_options
variable "auto_tune_options" {
description = "auto tuning releated options"
type = any
default = {}
}
variable "auto_tune_options_desired_state" {
description = "enable automatic tuning schedule for the cluster. values: ENABLED or DISABLED"
type = string
default = "DISABLED"
}
variable "auto_tune_options_rollback_on_disable" {
description = "(Optional) Whether to roll back to default Auto-Tune settings when disabling Auto-Tune. Valid values: DEFAULT_ROLLBACK or NO_ROLLBACK"
type = string
default = ""
}
variable "auto_tune_options_maintenance_schedule" {
description = "enable automatic tuning schedule for the cluster. values: ENABLED or DISABLED"
type = any
default = {}
}
# vpc_options
variable "vpc_options" {
description = "VPC related options, see below. Adding or removing this configuration forces a new resource"
type = any
default = {}
}
variable "vpc_options_security_group_ids" {
description = "List of VPC Security Group IDs to be applied to the Elasticsearch domain endpoints. If omitted, the default Security Group for the VPC will be used"
type = list(any)
default = []
}
variable "vpc_options_subnet_ids" {
description = "List of VPC Subnet IDs for the Elasticsearch domain endpoints to be created in"
type = list(any)
default = []
}
# log_publishing_options
variable "log_publishing_options" {
description = "Options for publishing slow logs to CloudWatch Logs"
type = any
default = {}
}
variable "log_publishing_options_retention" {
description = "Retention in days for the created Cloudwatch log group"
type = number
default = 90
}
# cognito_options
variable "cognito_options" {
description = "Options for Amazon Cognito Authentication for Kibana"
type = any
default = {}
}
variable "cognito_options_enabled" {
description = "Specifies whether Amazon Cognito authentication with Kibana is enabled or not"
type = bool
default = false
}
variable "cognito_options_user_pool_id" {
description = "ID of the Cognito User Pool to use"
type = string
default = ""
}
variable "cognito_options_identity_pool_id" {
description = "ID of the Cognito Identity Pool to use"
type = string
default = ""
}
variable "cognito_options_role_arn" {
description = "ARN of the IAM role that has the AmazonESCognitoAccess policy attached"
type = string
default = ""
}
variable "tags" {
description = "A mapping of tags to assign to the resource"
type = map(any)
default = {}
}
# Timeouts
variable "timeouts" {
description = "Timeouts map."
type = map(any)
default = {}
}
variable "timeouts_update" {
description = "How long to wait for updates."
type = string
default = null
}
# Service Link Role
variable "create_service_link_role" {
description = "Create service link role for AWS Elasticsearch Service"
type = bool
default = true
}