-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvariables.tf
More file actions
351 lines (333 loc) · 9.1 KB
/
variables.tf
File metadata and controls
351 lines (333 loc) · 9.1 KB
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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
variable "project_name" {
description = "The name of the project this relates to."
type = string
}
variable "environment_name" {
description = "The name of the environment where AWS Backup is configured."
type = string
}
variable "notifications_target_email_address" {
description = "The email address to which backup notifications will be sent via SNS."
type = string
default = ""
}
variable "bootstrap_kms_key_arn" {
description = "The ARN of the bootstrap KMS key used for encryption at rest of the SNS topic."
type = string
}
variable "reports_bucket" {
description = "Bucket to drop backup reports into"
type = string
}
variable "terraform_role_arn" {
description = "ARN of Terraform role used to deploy to account"
type = string
}
variable "restore_testing_plan_algorithm" {
description = "Algorithm of the Recovery Selection Point"
type = string
default = "LATEST_WITHIN_WINDOW"
}
variable "restore_testing_plan_start_window" {
description = "Start window from the scheduled time during which the test should start"
type = number
default = 1
}
variable "restore_testing_plan_scheduled_expression" {
description = "Scheduled Expression of Recovery Selection Point"
type = string
default = "cron(0 1 ? * SUN *)"
}
variable "restore_testing_plan_recovery_point_types" {
description = "Recovery Point Types"
type = list(string)
default = ["SNAPSHOT"]
}
variable "restore_testing_plan_selection_window_days" {
description = "Selection window days"
type = number
default = 7
}
variable "backup_copy_vault_arn" {
description = "The ARN of the destination backup vault for cross-account backup copies."
type = string
default = ""
}
variable "backup_copy_vault_account_id" {
description = "The account id of the destination backup vault for allowing restores back into the source account."
type = string
default = ""
}
variable "backup_plan_config" {
description = "Configuration for backup plans"
type = object({
selection_tag = string
selection_tag_value = optional(string)
selection_tags = optional(list(object({
key = optional(string)
value = optional(string)
})))
compliance_resource_types = list(string)
rules = list(object({
name = string
schedule = string
completion_window = optional(number)
enable_continuous_backup = optional(bool)
lifecycle = object({
delete_after = optional(number)
cold_storage_after = optional(number)
})
copy_action = optional(object({
delete_after = optional(number)
}))
}))
})
default = {
selection_tag = "BackupLocal"
selection_tag_value = "True"
selection_tags = []
compliance_resource_types = ["S3"]
rules = [
{
name = "daily_kept_5_weeks"
schedule = "cron(0 0 * * ? *)"
lifecycle = {
delete_after = 35
}
copy_action = {
delete_after = 365
}
},
{
name = "weekly_kept_3_months"
schedule = "cron(0 1 ? * SUN *)"
lifecycle = {
delete_after = 90
}
copy_action = {
delete_after = 365
}
},
{
name = "monthly_kept_7_years"
schedule = "cron(0 2 1 * ? *)"
lifecycle = {
cold_storage_after = 30
delete_after = 2555
}
copy_action = {
delete_after = 365
}
},
{
name = "point_in_time_recovery"
schedule = "cron(0 5 * * ? *)"
enable_continuous_backup = true
lifecycle = {
delete_after = 35
}
copy_action = {
delete_after = 365
}
}
]
}
}
variable "backup_plan_config_dynamodb" {
description = "Configuration for backup plans with dynamodb"
type = object({
enable = bool
selection_tag = string
selection_tag_value = optional(string)
selection_tags = optional(list(object({
key = optional(string)
value = optional(string)
})))
compliance_resource_types = list(string)
rules = optional(list(object({
name = string
schedule = string
completion_widow = optional(number)
enable_continuous_backup = optional(bool)
lifecycle = object({
delete_after = number
cold_storage_after = optional(number)
})
copy_action = optional(object({
delete_after = optional(number)
}))
})))
})
default = {
enable = true
selection_tag = "BackupDynamoDB"
selection_tag_value = "True"
selection_tags = []
compliance_resource_types = ["DynamoDB"]
rules = [
{
name = "dynamodb_daily_kept_5_weeks"
schedule = "cron(0 0 * * ? *)"
lifecycle = {
delete_after = 35
}
copy_action = {
delete_after = 365
}
},
{
name = "dynamodb_weekly_kept_3_months"
schedule = "cron(0 1 ? * SUN *)"
lifecycle = {
delete_after = 90
}
copy_action = {
delete_after = 365
}
},
{
name = "dynamodb_monthly_kept_7_years"
schedule = "cron(0 2 1 * ? *)"
lifecycle = {
cold_storage_after = 30
delete_after = 2555
}
copy_action = {
delete_after = 365
}
}
]
}
}
variable "name_prefix" {
description = "Optional name prefix for vault resources"
type = string
default = null
}
variable "backup_plan_config_aurora" {
description = "Configuration for backup plans with aurora"
type = object({
enable = bool
selection_tag = string
compliance_resource_types = list(string)
restore_testing_overrides = optional(string)
rules = optional(list(object({
name = string
schedule = string
enable_continuous_backup = optional(bool)
lifecycle = object({
delete_after = number
cold_storage_after = optional(number)
})
copy_action = optional(object({
delete_after = optional(number)
}))
})))
})
default = {
enable = true
selection_tag = "BackupAurora"
compliance_resource_types = ["Aurora"]
rules = [
{
name = "aurora_daily_kept_5_weeks"
schedule = "cron(0 0 * * ? *)"
lifecycle = {
delete_after = 35
}
copy_action = {
delete_after = 365
}
},
{
name = "aurora_weekly_kept_3_months"
schedule = "cron(0 1 ? * SUN *)"
lifecycle = {
delete_after = 90
}
copy_action = {
delete_after = 365
}
},
{
name = "aurora_monthly_kept_7_years"
schedule = "cron(0 2 1 * ? *)"
lifecycle = {
cold_storage_after = 30
delete_after = 2555
}
copy_action = {
delete_after = 365
}
}
]
}
}
variable "iam_role_permissions_boundary" {
description = "Optional permissions boundary ARN for backup role"
type = string
default = "" # Empty by default
}
variable "backup_plan_config_ebsvol" {
description = "Configuration for backup plans with EBS"
type = object({
enable = bool
selection_tag = string
selection_tag_value = optional(string)
selection_tags = optional(list(object({
key = optional(string)
value = optional(string)
})))
compliance_resource_types = list(string)
rules = optional(list(object({
name = string
schedule = string
enable_continuous_backup = optional(bool)
lifecycle = object({
delete_after = number
cold_storage_after = optional(number)
})
copy_action = optional(object({
delete_after = optional(number)
}))
})))
})
default = {
enable = true
selection_tag = "BackupEBSVol"
compliance_resource_types = ["EBS"]
rules = [
{
name = "ebsvol_daily_kept_5_weeks"
schedule = "cron(0 0 * * ? *)"
lifecycle = {
delete_after = 35
}
copy_action = {
delete_after = 365
}
},
{
name = "ebsvol_weekly_kept_3_months"
schedule = "cron(0 1 ? * SUN *)"
lifecycle = {
delete_after = 90
}
copy_action = {
delete_after = 365
}
},
{
name = "ebsvol_monthly_kept_7_years"
schedule = "cron(0 2 1 * ? *)"
lifecycle = {
cold_storage_after = 30
delete_after = 2555
}
copy_action = {
delete_after = 365
}
}
]
}
}