-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvars.tf
274 lines (229 loc) · 7.29 KB
/
vars.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
variable "engine" {
type = string
default = "mysql"
description = "Visit https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html for engine type"
}
variable "engine_version" {
type = string
default = "8.0.23"
description = "Visit https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html for engine version"
}
variable "instance_name" {
type = string
default = "mysql-db"
description = "Name of RDS instance"
}
variable "random_password" {
type = bool
default = true
description = "Whether to generate random password. This password will be stored in SSM Parameter Store as a `SecureString`"
}
variable "db_username" {
type = string
default = "dbadmin"
description = "Master username for RDS instance"
}
variable "db_password" {
type = string
default = ""
description = "Master password for RDS instance. This password will be stored in SSM Parameter Store as a `SecureString`. **Note:** Required if random_password is set to false"
}
variable "instance_type" {
type = string
default = "db.t3.medium"
description = "Instance type for RDS database"
}
variable "ca_cert" {
type = string
default = "rds-ca-2019"
description = "Root CA cert to be used for in-transit encryption"
}
variable "storage_type" {
type = string
default = "gp2"
description = "Type of storage to be used for RDS instance"
}
variable "storage_size" {
type = number
default = 50
description = "Size of EBS storage attached to database"
}
variable "iops" {
type = number
default = 0
description = "IOPS for EBS storage. **Note:** Required only for io1 volume"
}
variable "max_allocated_storage" {
type = number
default = 1000
description = "Enable storage auto-scaling feature. To disable provide 0 as value"
}
variable "multi_az" {
type = bool
default = true
description = "Whether to deploy a multi-az database"
}
variable "subnet_group_name" {
type = string
default = ""
description = "Database subnet group to be used while launching database. **Note:** Either of subnet_group_name or subnet_ids is required"
}
variable "subnet_ids" {
type = list(string)
default = []
description = "Subnet IDs to be used for launching database. **Note:** Either of subnet_group_name or subnet_ids is required"
}
variable "publicly_accessible" {
type = bool
default = false
description = "Whether to allow access from outside world"
}
variable "sg_ids" {
type = list(string)
description = "List of security groups to be attached to RDS instance"
}
variable "db_port" {
type = number
default = 3306
description = "Port on which database should accept incoming connections"
}
variable "db_name" {
type = string
default = ""
description = "Name of the default database to be created"
}
variable "parameter_group_name" {
type = string
default = "default.mysql8.0"
description = "Parameter group name to be used for database"
}
variable "option_group_name" {
type = string
default = "default:mysql-8-0"
description = "Option group name to be used for database"
}
variable "storage_encrypted" {
type = bool
default = true
description = "Whether to apply server-side encryption"
}
variable "db_kms_key" {
type = string
default = "alias/aws/rds"
description = "KMS key to use for server-side encryption"
}
variable "ssm_kms_key" {
type = string
default = "alias/aws/ssm"
description = "KMS key to store encrypted password in AWS SSM Parameter store service"
}
variable "backup_retention_period" {
type = number
default = 7
description = "Number of days to retain automated backups"
}
variable "backup_window" {
type = string
default = ""
description = "The time period when backup activity must be performed"
}
variable "copy_tags_to_snapshot" {
type = bool
default = true
description = "Whether to copy RDS tags to snapshot"
}
variable "monitoring_interval" {
type = number
default = 0
description = "To enable detailed monitoring provide interval in seconds. Valid Values: 0, 1, 5, 10, 15, 30, 60. 0 wil disable detailed monitoring"
}
variable "cw_log_exports" {
type = list(string)
default = []
description = "List of logs to be exported to cloudwatch logs"
}
variable "auto_minor_version_upgrade" {
type = bool
default = true
description = "Whether to update minor version of database if available"
}
variable "maintenance_window" {
type = string
default = ""
description = "The time period when maintenance activity must be performed"
}
variable "skip_final_snapshot" {
type = bool
default = false
description = "Whether to skip final snapshot when terminating database"
}
variable "final_snapshot_identifier" {
type = string
default = "db-final-snapshot"
description = "Name of final snapshot that will be created before deleting database"
}
variable "deletion_protection" {
type = bool
default = true
description = "Option to prevent accidental deletion of RDS instance"
}
variable "enable_iam_auth" {
type = bool
default = false
description = "Whether to enable IAM authetication feature for database"
}
variable "performance_insights_enabled" {
type = bool
default = true
description = "Whether to enable performance insights"
}
variable "performance_insights_kms_key" {
type = string
default = "alias/aws/rds"
description = "KMS key to be used for encrypting database insight data"
}
variable "performance_insights_retention_period" {
type = number
default = 7
description = "Number of days to retain performance insights data"
}
variable "db_license" {
type = string
default = "bring-your-own-license"
description = "Type of license required to use the database. Valid values: license-included, bring-your-own-license. **Note:** Required only for Oracle database"
}
variable "character_set" {
type = string
default = "UTF8"
description = "Character set to be used for database. **Note:** Required only for Oracle database"
}
variable "ad_domain_id" {
type = string
default = ""
description = "Active Directory domain ID to connect to MS-SQL database. **Note:** Required only for MS-SQL Server"
}
variable "timezone" {
type = string
default = ""
description = "Timezone to be set for database. **Note:** Required only for MS-SQL Server"
}
variable "snapshot_id" {
type = string
default = ""
description = "If you want to restore a snapshot or create database from an existing snapshot please provide the snapshot ID"
}
variable "apply_immediately" {
type = bool
default = false
description = "Apply database changes immediately instead of waiting until next maintenance windows"
}
variable "allow_major_version_upgrade" {
type = bool
default = false
description = "Indicates that major version upgrades are allowed"
}
variable "tags" {
type = map(string)
default = {}
description = "Map of tags to associate with db instance"
}