The AWS Backup Module helps automates the setup of AWS Backup resources in a source account. It streamlines the process of creating, managing, and standardising backup configurations.
module "test_aws_backup" {
source = "./modules/aws-backup"
environment_name = "environment_name"
bootstrap_kms_key_arn = kms_key[0].arn
project_name = "testproject"
reports_bucket = "compliance-reports"
terraform_role_arn = data.aws_iam_role.terraform_role.arn
}| Name | Version |
|---|---|
| terraform | >= 1.9.5 |
| archive | ~> 2 |
| aws | ~> 5 |
| awscc | ~> 1 |
| Name | Version |
|---|---|
| aws | ~> 5 |
| awscc | ~> 1 |
No modules.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| backup_copy_vault_account_id | The account id of the destination backup vault for allowing restores back into the source account. | string |
"" |
no |
| backup_copy_vault_arn | The ARN of the destination backup vault for cross-account backup copies. | string |
"" |
no |
| backup_plan_config | Configuration for backup plans | object({ |
{ |
no |
| backup_plan_config_dynamodb | Configuration for backup plans with dynamodb | object({ |
{ |
no |
| backup_plan_config_rds | Configuration for backup plans with RDS |
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_window = 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)
}))
})))
}) | {
"compliance_resource_types": [
"RDS"
],
"enable": true,
"rules": [
{
"copy_action": {
"delete_after": 365
},
"lifecycle": {
"delete_after": 35
},
"completion_window": 24,
"name": "rds_daily_kept_5_weeks",
"schedule": "cron(0 0 * * ? *)"
},
{
"copy_action": {
"delete_after": 365
},
"lifecycle": {
"delete_after": 90
},
"completion_window": 48,
"name": "rds_weekly_kept_3_months",
"schedule": "cron(0 1 ? * SUN *)"
},
{
"copy_action": {
"delete_after": 365
},
"lifecycle": {
"cold_storage_after": 30,
"delete_after": 2555
},
"completion_window": 72,
"name": "rds_monthly_kept_7_years",
"schedule": "cron(0 2 1 * ? *)"
}
],
"selection_tag": "BackupRDS",
"selection_tag_value": "True",
"selection_tags": []
} | no |
| backup_plan_config_aurora | Configuration for backup plans with aurora | 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)
}))
})))
}) | {
"compliance_resource_types": [
"Aurora"
],
"enable": true,
"restore_testing_overrides" : "{"dbsubnetgroupname": "test-subnet"}",
"rules": [
{
"copy_action": {
"delete_after": 365
},
"lifecycle": {
"delete_after": 35
},
"name": "aurora_daily_kept_5_weeks",
"schedule": "cron(0 0 * * ? *)"
},
{
"copy_action": {
"delete_after": 365
},
"lifecycle": {
"delete_after": 90
},
"name": "aurora_weekly_kept_3_months",
"schedule": "cron(0 1 ? * SUN *)"
},
{
"copy_action": {
"delete_after": 365
},
"lifecycle": {
"cold_storage_after": 30,
"delete_after": 2555
},
"name": "aurora_monthly_kept_7_years",
"schedule": "cron(0 2 1 * ? *)"
}
],
"selection_tag": "BackupAurora"
} | no |
| bootstrap_kms_key_arn | The ARN of the bootstrap KMS key used for encryption at rest of the SNS topic. | string | n/a | yes |
| environment_name | The name of the environment where AWS Backup is configured. | string | n/a | yes |
| name_prefix | Optional name prefix for vault resources | string | null | no |
| notifications_target_email_address | The email address to which backup notifications will be sent via SNS. | string | "" | no |
| project_name | The name of the project this relates to. | string | n/a | yes |
| reports_bucket | Bucket to drop backup reports into | string | n/a | yes |
| restore_testing_plan_algorithm | Algorithm of the Recovery Selection Point | string | "LATEST_WITHIN_WINDOW" | no |
| restore_testing_plan_recovery_point_types | Recovery Point Types | list(string) | [| no | | restore_testing_plan_scheduled_expression | Scheduled Expression of Recovery Selection Point |
"SNAPSHOT"
]
string | "cron(0 1 ? * SUN *)" | no |
| restore_testing_plan_selection_window_days | Selection window days | number | 7 | no |
| restore_testing_plan_start_window | Start window from the scheduled time during which the test should start | number | 1 | no |
| terraform_role_arn | ARN of Terraform role used to deploy to account | string | n/a | yes |
No outputs.