Skip to content

Repository files navigation

terraform-aws-backup

Terraform module for AWS Backup vaults, plans, selections, notifications, region settings and vault lock configuration.

Compatibility

This module requires Terraform 1.6.0 or later and supports AWS provider versions from 5.40.0 up to, but not including, 7.0.0.

Requirements

Name Version
terraform >= 1.6.0
aws >= 5.40.0, < 7.0.0

Providers

Name Version
aws >= 5.40.0, < 7.0.0

Modules

No modules.

Resources

Name Type
aws_backup_plan.default resource
aws_backup_region_settings.this resource
aws_backup_selection.default resource
aws_backup_vault.default resource
aws_backup_vault_lock_configuration.default resource
aws_backup_vault_notifications.this resource
aws_iam_policy.s3 resource
aws_iam_role.default resource
aws_iam_role_policy_attachment.default resource
aws_iam_role_policy_attachment.s3 resource
aws_caller_identity.current data source
aws_iam_policy_document.assume_role_policy data source

Inputs

Name Description Type Default Required
backup_vault_lock_configuration The backup vault lock configuration, each vault can have one vault lock in place. This will enable Backup Vault Lock on an AWS Backup vault it prevents the deletion of backup data for the specified retention period. During this time, the backup data remains immutable and cannot be deleted or modified."
changeable_for_days - The number of days before the lock date. If omitted creates a vault lock in governance mode, otherwise it will create a vault lock in compliance mode.
any null no
create_backup_plan (Required) Whether to create backup plan. bool true no
create_backup_vault (Required) Whether to create backup vault. bool true no
create_iam_role (Required) Whether to create iam role. bool true no
name (Required) The display name of a backup plan. string null no
notifications (Optional) An array of events that indicate the status of jobs to back up resources to the backup vault. any {} no
region_settings (Optional) Provides an AWS Backup Region Settings resource.. any {} no
rules (Required) A rule object that specifies a scheduled task that is used to back up a selection of resources. any [] no
selection_conditions A map of conditions that you define to assign resources to your backup plans using tags. map(any) {} no
selection_name The display name of a resource selection document string null no
selection_not_resources An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan. list(any) [] no
selection_resources An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan list(any) [] no
selection_tags List of tags for selection_name var, when using variable definition. list(any) [] no
selections (Required) A list of selections maps. any [] no
tags (Optional) Metadata that you can assign to help organize the resources that you create. map(string) {} no
vault_kms_key_arn (Optional) The server-side encryption key that is used to protect your backups. string null no

Outputs

Name Description
plan_id The ID of backup plan.
plan_name The name of backup plan.
role_arn ARN of IAM role.
vault_id The id of vault.
vault_name The name of vault.

Example

See examples/complete.

About

Terraform AWS Backup module

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages