-
Notifications
You must be signed in to change notification settings - Fork 68
/
variables.tf
216 lines (180 loc) · 5.2 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
variable "project" {
default = "Unknown"
type = string
description = "Name of project this VPC is meant to house"
}
variable "environment" {
default = "Unknown"
type = string
description = "Name of environment this VPC is targeting"
}
variable "allocated_storage" {
default = 32
type = number
description = "Storage allocated to database instance"
}
variable "engine_version" {
default = "11.5"
type = string
description = "Database engine version"
}
variable "instance_type" {
default = "db.t3.micro"
type = string
description = "Instance type for database instance"
}
variable "storage_type" {
default = "gp2"
type = string
description = "Type of underlying storage for database"
}
variable "iops" {
default = 0
type = number
description = "The amount of provisioned IOPS"
}
variable "vpc_id" {
type = string
description = "ID of VPC meant to house database"
}
variable "database_identifier" {
type = string
description = "Identifier for RDS instance"
}
variable "snapshot_identifier" {
default = ""
type = string
description = "The name of the snapshot (if any) the database should be created from"
}
variable "database_name" {
type = string
description = "Name of database inside storage engine"
}
variable "database_username" {
type = string
description = "Name of user inside storage engine"
}
variable "database_password" {
type = string
description = "Database password inside storage engine"
}
variable "database_port" {
default = 5432
type = number
description = "Port on which database will accept connections"
}
variable "backup_retention_period" {
default = 30
type = number
description = "Number of days to keep database backups"
}
variable "backup_window" {
# 12:00AM-12:30AM ET
default = "04:00-04:30"
type = string
description = "30 minute time window to reserve for backups"
}
variable "maintenance_window" {
# SUN 12:30AM-01:30AM ET
default = "sun:04:30-sun:05:30"
type = string
description = "60 minute time window to reserve for maintenance"
}
variable "auto_minor_version_upgrade" {
default = true
type = bool
description = "Minor engine upgrades are applied automatically to the DB instance during the maintenance window"
}
variable "final_snapshot_identifier" {
default = "terraform-aws-postgresql-rds-snapshot"
type = string
description = "Identifier for final snapshot if skip_final_snapshot is set to false"
}
variable "skip_final_snapshot" {
default = true
type = bool
description = "Flag to enable or disable a snapshot if the database instance is terminated"
}
variable "copy_tags_to_snapshot" {
default = false
type = bool
description = "Flag to enable or disable copying instance tags to the final snapshot"
}
variable "multi_availability_zone" {
default = false
type = bool
description = "Flag to enable hot standby in another availability zone"
}
variable "storage_encrypted" {
default = false
type = bool
description = "Flag to enable storage encryption"
}
variable "monitoring_interval" {
default = 0
type = number
description = "The interval, in seconds, between points when Enhanced Monitoring metrics are collected"
}
variable "deletion_protection" {
default = false
type = bool
description = "Flag to protect the database instance from deletion"
}
variable "cloudwatch_logs_exports" {
default = ["postgresql", "upgrade"]
type = list
description = "List of logs to publish to CloudWatch Logs"
}
variable "subnet_group" {
type = string
description = "Database subnet group"
}
variable "parameter_group" {
default = "default.postgres11"
type = string
description = "Database engine parameter group"
}
variable "alarm_cpu_threshold" {
default = 75
type = number
description = "CPU alarm threshold as a percentage"
}
variable "alarm_disk_queue_threshold" {
default = 10
type = number
description = "Disk queue alarm threshold"
}
variable "alarm_free_disk_threshold" {
# 5GB
default = 5000000000
type = number
description = "Free disk alarm threshold in bytes"
}
variable "alarm_free_memory_threshold" {
# 128MB
default = 128000000
type = number
description = "Free memory alarm threshold in bytes"
}
variable "alarm_cpu_credit_balance_threshold" {
default = 30
type = number
description = "CPU credit balance threshold (only for db.t* instance types)"
}
variable "alarm_actions" {
type = list
description = "List of ARNs to be notified via CloudWatch when alarm enters ALARM state"
}
variable "ok_actions" {
type = list
description = "List of ARNs to be notified via CloudWatch when alarm enters OK state"
}
variable "insufficient_data_actions" {
type = list
description = "List of ARNs to be notified via CloudWatch when alarm enters INSUFFICIENT_DATA state"
}
variable "tags" {
default = {}
type = map(string)
description = "Extra tags to attach to the RDS resources"
}