-
-
Notifications
You must be signed in to change notification settings - Fork 161
/
variables.tf
544 lines (448 loc) · 18.1 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
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
variable "create" {
description = "Determines whether to create Redshift cluster and resources (affects all resources)"
type = bool
default = true
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
################################################################################
# Cluster
################################################################################
variable "allow_version_upgrade" {
description = "If `true`, major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default is `true`"
type = bool
default = null
}
variable "apply_immediately" {
description = "Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`"
type = bool
default = null
}
variable "aqua_configuration_status" {
description = "The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values are `enabled`, `disabled`, and `auto`. Requires Cluster reboot"
type = string
default = null
}
variable "automated_snapshot_retention_period" {
description = "The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with create-cluster-snapshot. Default is 1"
type = number
default = null
}
variable "availability_zone" {
description = "The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. Can only be changed if `availability_zone_relocation_enabled` is `true`"
type = string
default = null
}
variable "availability_zone_relocation_enabled" {
description = "If `true`, the cluster can be relocated to another availability zone, either automatically by AWS or when requested. Default is `false`. Available for use on clusters from the RA3 instance family"
type = bool
default = null
}
variable "cluster_identifier" {
description = "The Cluster Identifier. Must be a lower case string"
type = string
default = ""
}
# cluster_parameter_group_name -> see parameter group section
# cluster_subnet_group_name -> see subnet group section
variable "cluster_version" {
description = "The version of the Amazon Redshift engine software that you want to deploy on the cluster. The version selected runs on all the nodes in the cluster"
type = string
default = null
}
variable "database_name" {
description = "The name of the first database to be created when the cluster is created. If you do not provide a name, Amazon Redshift will create a default database called `dev`"
type = string
default = null
}
# default_iam_role_arn -> see iam roles section
variable "elastic_ip" {
description = "The Elastic IP (EIP) address for the cluster"
type = string
default = null
}
variable "encrypted" {
description = "If `true`, the data in the cluster is encrypted at rest"
type = bool
default = true
}
variable "enhanced_vpc_routing" {
description = "If `true`, enhanced VPC routing is enabled"
type = bool
default = null
}
variable "final_snapshot_identifier" {
description = "The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, `skip_final_snapshot` must be `false`"
type = string
default = null
}
# iam_roles -> see iam roles section
variable "kms_key_arn" {
description = "The ARN for the KMS encryption key. When specifying `kms_key_arn`, `encrypted` needs to be set to `true`"
type = string
default = null
}
variable "logging" {
description = "Logging configuration for the cluster"
type = any
default = {}
}
variable "maintenance_track_name" {
description = "The name of the maintenance track for the restored cluster. When you take a snapshot, the snapshot inherits the MaintenanceTrack value from the cluster. The snapshot might be on a different track than the cluster that was the source for the snapshot. Default value is `current`"
type = string
default = null
}
variable "manual_snapshot_retention_period" {
description = "The default number of days to retain a manual snapshot. If the value is -1, the snapshot is retained indefinitely. This setting doesn't change the retention period of existing snapshots. Valid values are between `-1` and `3653`. Default value is `-1`"
type = number
default = null
}
variable "manage_master_password" {
description = "Whether to use AWS SecretsManager to manage the cluster admin credentials. Conflicts with `master_password`. One of `master_password` or `manage_master_password` is required unless `snapshot_identifier` is provided"
type = bool
default = false
}
variable "master_password_secret_kms_key_id" {
description = "ID of the KMS key used to encrypt the cluster admin credentials secret"
type = string
default = null
}
variable "master_password" {
description = "Password for the master DB user. (Required unless a `snapshot_identifier` is provided). Must contain at least 8 chars, one uppercase letter, one lowercase letter, and one number"
type = string
default = null
sensitive = true
}
variable "multi_az" {
description = "Specifies if the Redshift cluster is multi-AZ"
type = bool
default = null
}
variable "create_random_password" {
description = "Determines whether to create random password for cluster `master_password`"
type = bool
default = true
}
variable "random_password_length" {
description = "Length of random password to create. Defaults to `16`"
type = number
default = 16
}
variable "master_username" {
description = "Username for the master DB user (Required unless a `snapshot_identifier` is provided). Defaults to `awsuser`"
type = string
default = "awsuser"
}
variable "node_type" {
description = "The node type to be provisioned for the cluster"
type = string
default = ""
}
variable "number_of_nodes" {
description = "Number of nodes in the cluster. Defaults to 1. Note: values greater than 1 will trigger `cluster_type` to switch to `multi-node`"
type = number
default = 1
}
variable "owner_account" {
description = "The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot"
type = string
default = null
}
variable "port" {
description = "The port number on which the cluster accepts incoming connections. Default port is 5439"
type = number
default = null
}
variable "preferred_maintenance_window" {
description = "The weekly time range (in UTC) during which automated cluster maintenance can occur. Format: `ddd:hh24:mi-ddd:hh24:mi`"
type = string
default = "sat:10:00-sat:10:30"
}
variable "publicly_accessible" {
description = "If true, the cluster can be accessed from a public network"
type = bool
default = false
}
variable "skip_final_snapshot" {
description = "Determines whether a final snapshot of the cluster is created before Redshift deletes the cluster. If true, a final cluster snapshot is not created. If false , a final cluster snapshot is created before the cluster is deleted"
type = bool
default = true
}
variable "snapshot_cluster_identifier" {
description = "The name of the cluster the source snapshot was created from"
type = string
default = null
}
variable "snapshot_copy" {
description = "Configuration of automatic copy of snapshots from one region to another"
type = any
default = {}
}
variable "snapshot_identifier" {
description = "The name of the snapshot from which to create the new cluster"
type = string
default = null
}
variable "vpc_security_group_ids" {
description = "A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster"
type = list(string)
default = []
}
variable "cluster_timeouts" {
description = "Create, update, and delete timeout configurations for the cluster"
type = map(string)
default = {}
}
################################################################################
# IAM Roles
################################################################################
variable "iam_role_arns" {
description = "A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time"
type = list(string)
default = []
}
variable "default_iam_role_arn" {
description = "The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created"
type = string
default = null
}
################################################################################
# Parameter Group
################################################################################
variable "create_parameter_group" {
description = "Determines whether to create a parameter group or use existing"
type = bool
default = true
}
variable "parameter_group_name" {
description = "The name of the Redshift parameter group, existing or to be created"
type = string
default = null
}
variable "parameter_group_description" {
description = "The description of the Redshift parameter group. Defaults to `Managed by Terraform`"
type = string
default = null
}
variable "parameter_group_family" {
description = "The family of the Redshift parameter group"
type = string
default = "redshift-1.0"
}
variable "parameter_group_parameters" {
description = "value"
type = map(any)
default = {}
}
variable "parameter_group_tags" {
description = "Additional tags to add to the parameter group"
type = map(string)
default = {}
}
################################################################################
# Subnet Group
################################################################################
variable "create_subnet_group" {
description = "Determines whether to create a subnet group or use existing"
type = bool
default = true
}
variable "subnet_group_name" {
description = "The name of the Redshift subnet group, existing or to be created"
type = string
default = null
}
variable "subnet_group_description" {
description = "The description of the Redshift Subnet group. Defaults to `Managed by Terraform`"
type = string
default = null
}
variable "subnet_ids" {
description = "An array of VPC subnet IDs to use in the subnet group"
type = list(string)
default = []
}
variable "subnet_group_tags" {
description = "Additional tags to add to the subnet group"
type = map(string)
default = {}
}
################################################################################
# Snapshot Schedule
################################################################################
variable "create_snapshot_schedule" {
description = "Determines whether to create a snapshot schedule"
type = bool
default = false
}
variable "snapshot_schedule_identifier" {
description = "The snapshot schedule identifier"
type = string
default = null
}
variable "use_snapshot_identifier_prefix" {
description = "Determines whether the identifier (`snapshot_schedule_identifier`) is used as a prefix"
type = bool
default = true
}
variable "snapshot_schedule_description" {
description = "The description of the snapshot schedule"
type = string
default = null
}
variable "snapshot_schedule_definitions" {
description = "The definition of the snapshot schedule. The definition is made up of schedule expressions, for example `cron(30 12 *)` or `rate(12 hours)`"
type = list(string)
default = []
}
variable "snapshot_schedule_force_destroy" {
description = "Whether to destroy all associated clusters with this snapshot schedule on deletion. Must be enabled and applied before attempting deletion"
type = bool
default = null
}
################################################################################
# Scheduled Action
################################################################################
variable "scheduled_actions" {
description = "Map of maps containing scheduled action definitions"
type = any
default = {}
}
variable "create_scheduled_action_iam_role" {
description = "Determines whether a scheduled action IAM role is created"
type = bool
default = false
}
variable "iam_role_name" {
description = "Name to use on scheduled action IAM role created"
type = string
default = null
}
variable "iam_role_use_name_prefix" {
description = "Determines whether scheduled action the IAM role name (`iam_role_name`) is used as a prefix"
type = string
default = true
}
variable "iam_role_path" {
description = "Scheduled action IAM role path"
type = string
default = null
}
variable "iam_role_description" {
description = "Description of the scheduled action IAM role"
type = string
default = null
}
variable "iam_role_permissions_boundary" {
description = "ARN of the policy that is used to set the permissions boundary for the scheduled action IAM role"
type = string
default = null
}
variable "iam_role_tags" {
description = "A map of additional tags to add to the scheduled action IAM role created"
type = map(string)
default = {}
}
################################################################################
# Endpoint Access
################################################################################
variable "create_endpoint_access" {
description = "Determines whether to create an endpoint access (managed VPC endpoint)"
type = bool
default = false
}
variable "endpoint_name" {
description = "The Redshift-managed VPC endpoint name"
type = string
default = ""
}
variable "endpoint_resource_owner" {
description = "The Amazon Web Services account ID of the owner of the cluster. This is only required if the cluster is in another Amazon Web Services account"
type = string
default = null
}
variable "endpoint_subnet_group_name" {
description = "The subnet group from which Amazon Redshift chooses the subnet to deploy the endpoint"
type = string
default = ""
}
variable "endpoint_vpc_security_group_ids" {
description = "The security group IDs to use for the endpoint access (managed VPC endpoint)"
type = list(string)
default = []
}
################################################################################
# Usage Limit
################################################################################
variable "usage_limits" {
description = "Map of usage limit definitions to create"
type = any
default = {}
}
################################################################################
# Authentication Profile
################################################################################
variable "authentication_profiles" {
description = "Map of authentication profiles to create"
type = any
default = {}
}
################################################################################
# CloudWatch Log Group
################################################################################
variable "create_cloudwatch_log_group" {
description = "Determines whether a CloudWatch log group is created for each `var.logging.log_exports`"
type = bool
default = false
}
variable "cloudwatch_log_group_retention_in_days" {
description = "The number of days to retain CloudWatch logs for the redshift cluster"
type = number
default = 0
}
variable "cloudwatch_log_group_kms_key_id" {
description = "The ARN of the KMS Key to use when encrypting log data"
type = string
default = null
}
variable "cloudwatch_log_group_skip_destroy" {
description = "Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state"
type = bool
default = null
}
variable "cloudwatch_log_group_tags" {
description = "Additional tags to add to cloudwatch log groups created"
type = map(string)
default = {}
}
################################################################################
# Managed Secret Rotation
################################################################################
variable "manage_master_password_rotation" {
description = "Whether to manage the master user password rotation. Setting this value to false after previously having been set to true will disable automatic rotation."
type = bool
default = false
}
variable "master_password_rotate_immediately" {
description = "Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window."
type = bool
default = null
}
variable "master_password_rotation_automatically_after_days" {
description = "Specifies the number of days between automatic scheduled rotations of the secret. Either `master_user_password_rotation_automatically_after_days` or `master_user_password_rotation_schedule_expression` must be specified."
type = number
default = null
}
variable "master_password_rotation_duration" {
description = "The length of the rotation window in hours. For example, 3h for a three hour window."
type = string
default = null
}
variable "master_password_rotation_schedule_expression" {
description = "A cron() or rate() expression that defines the schedule for rotating your secret. Either `master_user_password_rotation_automatically_after_days` or `master_user_password_rotation_schedule_expression` must be specified."
type = string
default = null
}