forked from deliveryhero/tf-aws-rds-aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
319 lines (261 loc) · 8.33 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
variable "name" {
description = "Name given resources"
type = string
}
variable "ca_cert_identifier" {
description = "The identifier of the CA certificate for the DB instances"
default = ""
}
variable "create_resources" {
description = "Whether to create the Aurora cluster and related resources"
default = true
type = bool
}
variable "subnet_ids" {
description = "List of subnet IDs to use"
type = list(string)
}
variable "identifier_prefix" {
description = "Prefix for cluster and instance identifier"
default = ""
}
variable "security_group_name_prefix" {
description = "Prefix for security group name"
default = "aurora-"
}
variable "replica_count" {
description = "Number of reader nodes to create. If `replica_scale_enable` is `true`, the value of `replica_scale_min` is used instead."
default = 1
}
variable "allowed_security_groups" {
description = "A list of Security Group ID's to allow access to."
default = []
}
variable "extra_security_groups" {
description = "A list of Security Group IDs to add to the cluster"
default = []
}
variable "vpc_id" {
description = "VPC ID"
type = string
}
variable "instance_type" {
description = "Instance type to use"
default = "db.r4.large"
}
variable "publicly_accessible" {
description = "Whether the DB should have a public IP address"
default = false
}
variable "username" {
description = "Master DB username"
default = "root"
}
variable "password" {
description = "Master DB password"
default = ""
}
variable "final_snapshot_identifier_prefix" {
description = "The prefix name to use when creating a final snapshot on cluster destroy, appends a random 8 digits to name to ensure it's unique too."
default = "final-"
}
variable "skip_final_snapshot" {
description = "Should a final snapshot be created on cluster destroy"
default = false
}
variable "backup_retention_period" {
description = "How long to keep backups for (in days)"
default = 7
}
variable "preferred_backup_window" {
description = "When to perform DB backups for the cluster"
default = "02:00-03:00"
}
variable "preferred_maintenance_window" {
description = "When to perform DB maintenance for the cluster"
default = "sun:05:00-sun:06:00"
}
variable "preferred_backup_window_instance" {
description = "When to perform DB backups for instances"
default = ""
}
variable "preferred_maintenance_window_instance" {
description = "When to perform DB maintenance for instances"
default = ""
}
variable "port" {
description = "The port on which to accept connections"
default = ""
}
variable "apply_immediately" {
description = "Determines whether or not any DB modifications are applied immediately, or during the maintenance window"
default = false
}
variable "monitoring_interval" {
description = "The interval (seconds) between points when Enhanced Monitoring metrics are collected"
default = 0
}
variable "auto_minor_version_upgrade" {
description = "Determines whether minor engine upgrades will be performed automatically in the maintenance window"
default = true
}
variable "db_parameter_group_name" {
description = "The name of a DB parameter group to use"
default = "default.aurora5.6"
}
variable "db_cluster_parameter_group_name" {
description = "The name of a DB Cluster parameter group to use"
default = "default.aurora5.6"
}
variable "snapshot_identifier" {
description = "DB snapshot to create this database from"
default = ""
}
variable "storage_encrypted" {
description = "Specifies whether the underlying storage layer should be encrypted"
default = false
}
variable "kms_key_id" {
description = "The ARN for the KMS encryption key if one is set to the cluster."
default = ""
}
variable "cloudwatch_create_alarms" {
type = bool
default = false
description = "Whether to enable CloudWatch alarms - requires `cw_sns_topic` is specified"
}
variable "cloudwatch_alarm_actions" {
type = list(string)
default = []
description = "Actions for cloudwatch alarms. e.g. an SNS topic"
}
variable "cloudwatch_alarm_default_thresholds" {
type = map(string)
default = {}
description = "Override default thresholds for CloudWatch alarms. See cloudwatch_alarm_default_thresholds in cloudwatch.tf for valid keys"
}
variable "engine" {
description = "Aurora database engine type, currently aurora, aurora-mysql or aurora-postgresql"
default = "aurora"
}
variable "engine_version" {
description = "Aurora database engine version."
default = "5.6.10a"
}
variable "replica_autoscaling" {
type = string
default = false
description = "Whether to enable autoscaling for RDS Aurora (MySQL) read replicas"
}
variable "replica_scale_max" {
type = string
default = 0
description = "Maximum number of replicas to allow scaling for"
}
variable "replica_scale_min" {
type = string
default = 1
description = "Maximum number of replicas to allow scaling for"
}
variable "replica_scale_cpu" {
type = string
default = 70
description = "CPU usage to trigger autoscaling at"
}
variable "replica_scale_in_cooldown" {
type = string
default = 300
description = "Cooldown in seconds before allowing further scaling operations after a scale in"
}
variable "replica_scale_out_cooldown" {
type = string
default = 300
description = "Cooldown in seconds before allowing further scaling operations after a scale out"
}
variable "route53_zone_id" {
type = string
default = ""
description = "If specified a route53 record will be created"
}
variable "route53_record_appendix" {
type = string
default = ".rds"
description = "Will be appended to the route53 record. Only used if route53_zone_id is passed also"
}
variable "route53_record_ttl" {
type = string
default = 60
description = "TTL of route53 record. Only used if route53_zone_id is passed also"
}
variable "tags" {
type = map(string)
default = {}
description = "A map of tags to add to all resources."
}
variable "performance_insights_enabled" {
type = string
default = false
description = "Specifies whether Performance Insights is enabled or not."
}
variable "deletion_protection" {
description = "The database can't be deleted when this value is set to true."
default = true
}
variable "performance_insights_kms_key_id" {
type = string
default = ""
description = "The ARN for the KMS key to encrypt Performance Insights data."
}
variable "create_timeout" {
type = string
default = "120m"
description = "Timeout used for Cluster creation"
}
variable "update_timeout" {
type = string
default = "120m"
description = "Timeout used for Cluster modifications"
}
variable "delete_timeout" {
type = string
default = "120m"
description = "Timeout used for destroying cluster. This includes any cleanup task during the destroying process."
}
variable "reader_endpoint_suffix" {
type = string
default = "-ro"
description = "Suffix for the Route53 record pointing to the cluster reader endpoint. Only used if route53_zone_id is passed also"
}
variable "create_data_reader" {
default = false
description = "Specifies if a data reader node is created."
}
variable "data_reader_parameter_group_name" {
type = string
default = ""
description = "Data reader node db parameter group"
}
variable "data_reader_endpoint_suffix" {
type = string
default = "-data-reader"
description = "Suffix for the Route53 record pointing to the cluster data reader endpoint. Only used if route53_zone_id is passed also"
}
variable "data_reader_tags" {
type = map(string)
default = {}
description = "A map of tags to add to data reader resources."
}
variable "data_reader_instance_type" {
description = "Instance type to use for data reader node"
default = "db.r4.large"
}
variable "data_reader_route53_zone_id" {
type = string
default = ""
description = "If specified a data reader route53 record will be created"
}
variable "data_reader_route53_prefix" {
type = string
default = ""
description = "If specified a data reader route53 record will be created"
}