-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
239 lines (203 loc) · 6.4 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
variable "create" {
description = "Whether to create resources"
type = bool
default = true
}
variable "create_db_subnet_group" {
description = "Whether to create db a subnet group"
type = bool
default = false
}
variable "db_subnet_group_name" {
description = "Name of DB Subnet Group"
type = string
default = null
}
variable "db_subnet_group_description" {
description = "Description of DB Subnet Group"
type = string
default = null
}
variable "db_subnets" {
description = "List of DB subnets"
type = list(any)
default = []
}
variable "availability_zone" {
description = "The AZ for the RDS instance"
type = string
default = null
}
variable "random_password_length" {
description = "Length of the random password"
type = number
default = 16
}
variable "db_identifier" {
description = "The name of the DB instance identifier."
type = string
default = null
}
variable "db_name" {
description = "The database name"
type = string
default = null
}
variable "db_master_username" {
description = "Master username for database"
type = string
default = null
}
variable "db_master_password" {
description = "Master password for database"
type = string
default = null
sensitive = true
}
variable "iam_database_authentication_enabled" {
description = <<EOF
Specifies whether or not the mappings of AWS Identity and
Access Management (IAM) accounts to database accounts are enabled
EOF
type = bool
default = false
}
variable "multi_az" {
description = "Determine if the RDS instance is multi-AZ"
type = bool
default = false
}
variable "engine" {
description = "The database engine to be used for the RDS instance."
type = string
default = null
}
variable "engine_version" {
description = "The version of the database engine to be used for the RDS instance."
type = string
default = null
}
variable "instance_class" {
description = "The instance class for the RDS instance."
type = string
default = null
}
variable "storage_type" {
description = "Choose storage type from - gp2, gp3, io1"
type = string
default = "gp2"
}
variable "allocated_storage" {
description = "The allocated storage in gigabytes"
type = string
default = "10"
}
variable "max_allocated_storage" {
description = <<EOF
When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance.
Configuring this will automatically ignore differences to allocated_storage.
Must be greater than or equal to allocated_storage or 0 to disable Storage Autoscaling.
EOF
type = string
default = "0"
}
variable "db_security_groups" {
description = "A list of security group IDs to associate with the DB instance"
type = list(string)
default = []
}
variable "publicly_accessible" {
description = "Determine if the RDS instance is publicly_accessible"
type = bool
default = false
}
variable "database_port" {
description = "The port on which the DB accepts connections."
type = number
default = null
}
variable "backup_retention_period" {
description = "The number of days to retain automated backups"
type = number
default = 0
}
variable "backup_window" {
description = "Must not overlap with maintenance_window"
type = string
default = null
}
variable "maintenance_window" {
description = "The window to perform maintenance in."
type = string
default = null
}
variable "deletion_protection" {
description = "Protect database from accidental deletion"
type = bool
default = false
}
variable "enabled_cloudwatch_logs_exports" {
description = <<EOF
Set of log types to enable for exporting to CloudWatch logs.
If omitted, no logs will be exported. Valid values (depending on engine).
MySQL and MariaDB: audit, error, general, slowquery.
PostgreSQL: postgresql, upgrade.
MSSQL: agent , error.
Oracle: alert, audit, listener, trace.
EOF
type = list(string)
default = []
}
variable "apply_immediately" {
description = <<EOF
Specifies whether any database modifications are applied immediately,
or during the next maintenance window.
EOF
type = bool
default = false
}
variable "delete_automated_backups" {
description = "Specifies whether to remove automated backups immediately after the DB instance is deleted."
type = bool
default = true
}
variable "allow_major_version_upgrade" {
description = "Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible."
type = bool
default = false
}
variable "auto_minor_version_upgrade" {
description = "Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window. Defaults to true."
type = bool
default = true
}
variable "skip_final_snapshot" {
description = "Determines whether a final DB snapshot is created before the DB instance is deleted"
type = bool
default = true
}
variable "storage_encrypted" {
description = "Specifies whether the DB instance is encrypted. Note that if you are creating a cross-region read replica this field is ignored and you should instead declare kms_key_id with a valid ARN. The default is false if not specified"
type = bool
default = false
}
variable "kms_key_id" {
description = "The ARN for the KMS encryption key. If creating an encrypted replica, set this to the destination KMS ARN"
type = string
default = null
}
variable "replicate_source_db" {
description = "Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the identifier of another Amazon RDS Database to replicate (if replicating within a single region) or ARN of the Amazon RDS Database to replicate (if replicating cross-region)"
type = string
default = null
}
variable "tags" {
description = "Tags to apply to resources"
type = map(string)
default = {}
}
variable "ca_cert_identifier" {
description = "The identifier of the CA certificate for the DB instance"
type = string
default = "rds-ca-ecc384-g1"
}