-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathmain.tf
More file actions
74 lines (67 loc) · 1.54 KB
/
main.tf
File metadata and controls
74 lines (67 loc) · 1.54 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
# AWS SNS Topic
resource "aws_sns_topic" "backup_vault_notifications" {
name = "backup-vault-events"
}
# AWS Backup
module "aws_backup_example" {
source = "../.."
# Vault
vault_name = "vault-3"
# Vault lock configuration
min_retention_days = 7 # Minimum retention of 7 days
max_retention_days = 90 # Maximum retention of 90 days
# Plan
plan_name = "simple-plan"
# Multiple rules using a list of maps
rules = [
{
name = "rule-1"
schedule = "cron(0 12 * * ? *)"
start_window = 120
completion_window = 360
lifecycle = {
delete_after = 90
}
copy_actions = []
recovery_point_tags = {
Environment = "prod"
}
},
{
name = "rule-2"
target_vault_name = "Default"
schedule = "cron(0 7 * * ? *)"
start_window = 120
completion_window = 360
lifecycle = {
delete_after = 90
}
copy_actions = []
recovery_point_tags = {
Environment = "prod"
}
}
]
# Multiple selections
selections = [
{
name = "selection-1"
resources = [
"arn:aws:dynamodb:us-east-1:123456789101:table/mydynamodb-table1",
"arn:aws:dynamodb:us-east-1:123456789101:table/mydynamodb-table2"
]
selection_tags = [
{
type = "STRINGEQUALS"
key = "Environment"
value = "prod"
}
]
}
]
tags = {
Owner = "backup team"
Environment = "prod"
Terraform = true
}
}