generated from DNXLabs/terraform-aws-template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
_variables.tf
388 lines (319 loc) · 9.8 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
variable "name" {
type = string
description = "Name of this RDS Database"
}
variable "environment_name" {
type = string
description = "Environment name to use as a prefix to this DB"
}
variable "db_type" {
type = string
description = "Valid values are: rds, aurora or serverless"
}
variable "iam_database_authentication_enabled" {
type = bool
default = false
}
variable "allow_security_group_ids" {
type = list(object({
security_group_id = string
description = string
name = string
}))
description = "List of Security Group IDs to allow connection to this DB"
default = []
}
variable "allow_security_group_ids_replica" {
type = list(object({
security_group_id = string
description = string
name = string
}))
description = "List of Security Group IDs to allow connection to this DB Replica"
default = []
}
variable "allow_cidrs" {
type = list(string)
default = []
description = "List of CIDRs to allow connection to this DB"
}
variable "allow_cidrs_replica" {
type = list(string)
default = []
description = "List of CIDRs to allow connection to this DB Replica"
}
variable "user" {
type = string
description = "DB User"
}
variable "retention" {
type = number
description = "Snapshot retention period in days"
}
variable "instance_class" {
type = string
}
variable "engine" {
type = string
}
variable "engine_version" {
type = string
default = ""
}
variable "port" {
type = number
description = "Port number for this DB (usually 3306 for MySQL and 5432 for Postgres)"
}
#variable "parameter_group_name" {
# type = string
# description = "Parameter group name for this DB"
#}
variable "apply_immediately" {
type = bool
default = true
description = "Apply changes immediately or wait for the maintainance window"
}
variable "skip_final_snapshot" {
type = bool
default = false
description = "Skips the final snapshot if the database is destroyed programatically"
}
variable "snapshot_identifier" {
type = string
default = ""
description = "Pass a snapshot identifier for the database to be created from this snapshot"
}
variable "final_snapshot_identifier" {
type = string
default = ""
description = "Pass the final snapshot identifier for the final snapshot to be created after the database is destroyed."
}
variable "identifier" {
type = string
default = ""
description = "Optional identifier for DB. If not passed, {environment_name}-{name} will be used"
}
variable "database_name" {
description = "Database Name"
type = string
default = ""
}
variable "storage_type" {
type = string
description = "The instance storage type"
default = "gp2"
}
variable "iops" {
type = number
description = "The amount of provisioned IOPS. Setting this implies a storage_type of io1"
default = null
}
variable "allocated_storage" {
type = number
description = "Storage size in GB"
default = null
}
variable "storage_encrypted" {
type = bool
description = "Enables storage encryption"
default = true
}
variable "kms_key_arn" {
type = string
default = ""
description = "KMS Key ARN to use a CMK instead of default shared key, when storage_encrypted is true"
}
variable "ssm_kms_key_id" {
type = string
default = ""
description = "KMS Key Id to use a CMK instead of default shared key for SSM parameters"
}
variable "backup" {
type = bool
description = "Enables automatic backup with AWS Backup"
}
variable "vpc_id" {
type = string
}
variable "create_db_subnet_group" {
description = "Create a Subnet group?"
default = false
}
variable "db_subnet_group_id" {
description = "RDS Subnet Group Name"
type = string
}
variable "db_subnet_group_replica_id" {
description = "RDS Subnet Group Name"
type = string
}
variable "db_subnet_group_subnet_ids" {
description = "List of Subnet IDs for the RDS Subnet Group"
default = []
}
variable "preferred_backup_window" {
description = "(Aurora Only) The daily time range (in UTC) during which automated backups are created if they are enabled. Example: '09:46-10:16'. Must not overlap with maintenance_window"
type = string
default = "07:00-09:00"
}
variable "count_aurora_instances" {
description = "Number of Aurora Instances"
type = number
default = "1"
}
# DB and Cluster parameter group
variable "create_cluster_parameter_group" {
description = "Whether to create a cluster parameter group"
type = bool
default = false
}
variable "cluster_parameters" {
description = "A list of Cluster parameters (map) to apply"
type = list(map(string))
default = []
}
variable "create_db_parameter_group" {
description = "Whether to create a database parameter group"
type = bool
default = false
}
variable "db_parameters" {
description = "A list of DB parameters (map) to apply"
type = list(map(string))
default = []
}
variable "parameter_group_name" {
description = "Name of the DB parameter group to associate or create"
type = string
default = null
}
#variable "use_name_prefix" {
# description = "Determines whether to use `parameter_group_name` as is or create a unique name beginning with `parameter_group_name` as the specified prefix"
# type = bool
# default = true
#}
variable "parameter_group_description" {
description = "The description of the DB parameter group"
type = string
default = "Managed by Terraform"
}
variable "family" {
description = "The family of the DB parameter group"
type = string
default = ""
}
# DB option group
variable "create_db_option_group" {
description = "(Optional) Create a database option group"
type = bool
default = false
}
variable "option_group_name" {
description = "Name of the option group"
type = string
default = null
}
variable "option_group_use_name_prefix" {
description = "Determines whether to use `option_group_name` as is or create a unique name beginning with the `option_group_name` as the prefix"
type = bool
default = true
}
variable "option_group_description" {
description = "The description of the option group"
type = string
default = "Managed by Terraform"
}
variable "major_engine_version" {
description = "Specifies the major version of the engine that this option group should be associated with"
type = string
default = ""
}
variable "options" {
description = "A list of Options to apply."
type = any
default = []
}
variable "deletion_protection" {
description = "The database can't be deleted when this value is set to true."
type = bool
default = false
}
variable "multi_az" {
description = "Deploy multi-az instance database"
type = bool
default = false
}
variable "performance_insights_enabled" {
description = "Enable performance insights on instance"
type = bool
default = false
}
variable "max_allocated_storage" {
type = number
description = "Argument higher than the allocated_storage to enable Storage Autoscaling, size in GB. 0 to disable Storage Autoscaling"
default = 0
}
variable "secret_method" {
description = "Use ssm for SSM parameters store which is the default option, or secretsmanager for AWS Secrets Manager"
type = string
default = "ssm"
}
variable "enabled_cloudwatch_logs_exports" {
description = "(Optional) Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on engine)"
default = null
}
variable "option_name" {
description = "(Required) The Name of the Option"
type = string
default = ""
}
variable "publicly_accessible" {
description = "(Optional) Bool to control if instance is publicly accessible"
type = bool
default = false
}
variable "publicly_accessible_replica" {
description = "(Optional) Bool to control if instance is publicly accessible"
type = bool
default = false
}
variable "license_model" {
description = "License model information for this DB instance (Optional, but required for some DB engines, i.e. Oracle SE1 and SQL Server)"
type = string
default = null
}
variable "monitoring_interval" {
type = number
description = "The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance"
default = 0
}
variable "maintenance_window" {
type = string
description = "(RDS Only) The window to perform maintenance in. Syntax: 'ddd:hh24:mi-ddd:hh24:mi'. Eg: 'Mon:00:00-Mon:03:00'"
default = "Sun:04:00-Sun:05:00"
}
variable "backup_window" {
description = "(RDS Only) The daily time range (in UTC) during which automated backups are created if they are enabled. Example: '09:46-10:16'. Must not overlap with maintenance_window"
type = string
default = "03:00-03:30"
}
variable "preferred_maintenance_window" {
type = string
description = "(Aurora Only) The weekly time range during which system maintenance can occur, in (UTC) e.g., wed:04:00-wed:04:30"
default = "Sun:04:00-Sun:05:00"
}
variable "auto_minor_version_upgrade" {
type = bool
description = "Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window"
default = true
}
variable "enable_replica" {
type = bool
description = "Enable read replica for RDS"
default = false
}
variable "instance_class_replica" {
type = string
description = "Define instance class for read replica"
default = null
}