Skip to content

dasmeta/terraform-aws-backup

Repository files navigation

terraform-aws-backup

This module is used to create and configure AWS Backup service together with related sns service and accesses

basic example

module "backup" {
  source  = "dasmeta/backup/aws"
  version = "x.y.z"

   plan_selection_tag = [
    {
      key   = "Environment"
      value = "dev"
    }
  ]

  rules = [
    {
      name              = "rule1"
      schedule          = "cron(0 12 * * ? *)"
      continuous_backup = true
    }
  ]
}

Requirements

Name Version
aws ~> 5.0

Providers

Name Version
aws 5.81.0

Modules

Name Source Version
sns_topic terraform-aws-modules/sns/aws 6.1.1

Resources

Name Type
aws_backup_plan.this resource
aws_backup_selection.selection_tag resource
aws_backup_vault.this resource
aws_backup_vault_notifications.this resource
aws_iam_role.backup resource
aws_iam_role_policy_attachment.main resource
aws_iam_role_policy_attachment.s3_backup resource
aws_iam_role_policy_attachment.s3_restore resource
aws_kms_alias.backup resource
aws_kms_alias.backup_sns resource
aws_kms_key.backup resource
aws_kms_key.this resource
aws_lambda_permission.with_sns resource
aws_sns_topic_subscription.email resource
aws_sns_topic_subscription.lambda resource
aws_caller_identity.current data source
aws_iam_policy_document.assume_backup_role data source
aws_iam_policy_document.backup_kms data source
aws_iam_policy_document.backup_notifications data source
aws_iam_policy_document.kms data source

Inputs

Name Description Type Default Required
alarm_email_addresses E-Mail addresses that should be subscribed to monitoring notifications list(string) [] no
alarm_lambda_arn ARN of a lambda function that should be subscribed to monitoring notifications string "" no
backup_plan_name Initial part of the plan name to which will be appended the env string "" no
backup_retention_days Number of days recovery points should be kept. number 7 no
enable_sns_notifications Create an SNS topic where backup notifications go bool false no
env Envrionment for the plan string "prod" no
kms_key_alias kms key alias string null no
plan_selection_tag Resource selection for the plan list(map(string))
[
{
"key": "Environment",
"value": "Production"
}
]
no
region The region where resources should be managed. string "eu-central-1" no
rules List of rules to attach to the plan list(any)
[
{
"continuous_backup": true,
"name": "daily",
"schedule": "cron(0 12 * * ? *)",
"vault": "Backup"
}
]
no
vault_name Backup vault name string "backup_vault" no

Outputs

No outputs.