-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathvariables.tf
313 lines (262 loc) · 8.37 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
variable "additional_tags" {
description = "A map of additional tags to apply to the AWS resources"
type = map(string)
default = {
automation = "true"
}
}
variable "allocated_storage" {
description = "The allocated storage capacity for the database in gibibytes (GiB)"
default = 20
type = number
}
variable "allowed_cidr_blocks" {
description = "A list of CIDR blocks that are allowed to access the database"
default = []
type = list(any)
}
variable "allowed_security_groups" {
description = "A list of Security Group IDs to allow access to the database"
default = []
type = list(any)
}
variable "apply_immediately" {
description = "Specifies whether any cluster modifications are applied immediately or during the next maintenance window"
default = false
type = bool
}
variable "backup_retention_period" {
description = "The number of days to retain backups for"
type = number
default = 5
}
variable "backup_window" {
description = "The preferred window for taking automated backups of the database"
default = "03:00-06:00"
type = string
}
variable "manage_master_user_password" {
description = "Whether to manage the master user password of the RDS primary cluster automatically"
type = bool
default = false
}
variable "create_security_group" {
description = "Whether to create a security group for the database"
default = true
type = bool
}
variable "deletion_protection" {
description = "Specifies whether accidental deletion protection is enabled"
default = true
type = bool
}
variable "enable_ssl_connection" {
description = "Whether to enable SSL connection to the database"
default = false
type = bool
}
variable "db_name" {
description = "The name of the automatically created database on cluster creation"
default = ""
type = string
}
variable "engine" {
description = "The name of the database engine to be used for this DB cluster"
default = "postgres"
type = string
}
variable "engine_version" {
description = "The database engine version. Updating this argument results in an outage"
default = ""
type = string
}
variable "environment" {
description = "Select enviroment type: dev, demo, prod"
default = ""
type = string
}
variable "family" {
description = "The version of the Postgresql DB family being created"
default = "postgres15"
type = string
}
variable "final_snapshot_identifier_prefix" {
description = "The prefix name for the final snapshot on cluster destroy"
type = string
default = "final"
}
variable "kms_key_arn" {
description = "The ARN for the KMS encryption key. Set this to the destination KMS ARN when creating an encrypted replica. If storage_encrypted is set to true and kms_key_id is not specified, the default KMS key created in your account will be used"
type = string
default = null
}
variable "instance_class" {
description = "The instance type for the database"
default = "db.m5.large"
type = string
}
variable "major_engine_version" {
description = "The major engine version for the database. Updating this argument results in an outage"
default = ""
type = string
}
variable "master_username" {
description = "The username for the RDS primary cluster"
default = ""
type = string
}
variable "maintenance_window" {
description = "The preferred window for performing database maintenance"
default = "Mon:00:00-Mon:03:00"
type = string
}
variable "multi_az" {
description = "Enable multi-AZ for disaster recovery"
default = false
type = bool
}
variable "name" {
description = "The name of the RDS instance"
default = ""
type = string
}
variable "port" {
description = "The port number for the database"
type = number
default = 5432
}
variable "publicly_accessible" {
description = "Specifies whether the RDS instance is publicly accessible over the internet"
default = false
type = bool
}
variable "random_password_length" {
description = "The length of the randomly generated password for the RDS primary cluster (default: 16)"
type = number
default = 16
}
variable "replicate_source_db" {
description = "Specifies that this resource is a replicate database, and uses the specified value as the source database identifier"
type = string
default = null
}
variable "create_db_subnet_group" {
description = "Whether to create a database subnet group"
type = bool
default = true
}
variable "skip_final_snapshot" {
description = "Determines whether a final DB snapshot is created before the DB instance is deleted. If set to true, no DB snapshot is created. If set to false, a DB snapshot is created before the DB instance is deleted, using the value from final_snapshot_identifier"
type = bool
default = true
}
variable "snapshot_identifier" {
description = "Specifies whether to create the database from a snapshot. Use the snapshot ID found in the RDS console, e.g., rds:production-2015-06-26-06-05"
type = string
default = null
}
variable "storage_encrypted" {
description = "Specifies whether to enable database encryption"
default = true
type = bool
}
variable "subnet_ids" {
description = "A list of subnet IDs used by the database subnet group"
default = []
type = list(any)
}
variable "vpc_id" {
description = "The ID of the VPC where the RDS cluster will be deployed"
default = ""
type = string
}
variable "disk_free_storage_space" {
type = string
default = "10000000000" // 10 GB
description = "Alarm threshold for the 'lowFreeStorageSpace' alarm"
}
variable "cloudwatch_metric_alarms_enabled" {
type = bool
description = "Boolean flag to enable/disable CloudWatch metrics alarms"
default = false
}
variable "alarm_cpu_threshold_percent" {
type = number
default = 75
description = "CPU threshold alarm level"
}
variable "alarm_actions" {
type = list(string)
description = "Alarm action list"
default = []
}
variable "ok_actions" {
type = list(string)
description = "The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN)"
default = []
}
variable "slack_notification_enabled" {
type = bool
description = "Whether to enable/disable slack notification."
default = false
}
variable "slack_webhook_url" {
description = "The Slack Webhook URL where notifications will be sent."
default = ""
type = string
}
variable "slack_channel" {
description = "The Slack channel where notifications will be posted."
default = ""
type = string
}
variable "slack_username" {
description = "The username to use when sending notifications to Slack."
default = ""
type = string
}
variable "cw_sns_topic_arn" {
description = "The username to use when sending notifications to Slack."
default = ""
type = string
}
variable "enable_storage_autoscaling" {
description = "Whether enable storage autoscaling or not"
default = true
type = bool
}
variable "max_allocated_storage" {
description = "The Maximum storage capacity for the database value after autoscaling"
default = null
type = number
}
variable "storage_type" {
description = "The storage type for the database storage like gp2,gp3,io1"
default = "gp2"
type = string
}
variable "replica_enable" {
description = "Whether enable replica DB"
default = false
type = bool
}
variable "replica_count" {
description = "The number of replica instance"
default = 1
type = number
}
variable "performance_insights_enabled" {
description = "Specifies whether Performance Insights are enabled"
type = bool
default = false
}
variable "performance_insights_retention_period" {
description = "The amount of time in days to retain Performance Insights data. Valid values are `7`, `731` (2 years) or a multiple of `31`"
type = number
default = 7
}
variable "custom_user_password" {
description = "Custom password for the RDS master user"
default = ""
type = string
}