Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Terraform module to provision AWS Backup, a fully managed backup service that makes it easy to centralize and automate the back up of data across AWS services such as EBS volumes, RDS databases, DynamoDB tables, EFS file systems, and AWS Storage Gateway volumes.

License

Notifications You must be signed in to change notification settings

humn-ai/tf-mod-aws-backup

 
 

Repository files navigation

README Header

tf-mod-aws-backup

Module description

Terraform module to provision AWS Backup, a fully managed backup service that makes it easy to centralize and automate the back up of data across AWS services such as Amazon EBS volumes, Amazon EC2 instances, Amazon RDS databases, Amazon DynamoDB tables, Amazon EFS file systems, and AWS Storage Gateway volumes.

Project: %!s() : [%!s()] | [%!s()]

Usage

IMPORTANT: The master branch is used in source just as an example. In your code, do not pin to master because there may be breaking changes between releases. Instead pin to the release tag (e.g. ?ref=tags/x.y.z) of one of our latest releases.

The below values shown in the usage of this module are purely representative, please replace desired values as required.

TO-DO

Examples

Simple and advanced examples of this project.

Advanced Example 1:

TO-DO

Providers

Name Version
aws ~> 2.0 >= 2.7.0 >= 2.0

Inputs

Name Description Type Default Required
backup_resources An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan list(string) n/a yes
cold_storage_after Specifies the number of days after creation that a recovery point is moved to cold storage number n/a yes
completion_window The amount of time AWS Backup attempts a backup before canceling the job and returning an error. Must be at least 60 minutes greater than start_window number n/a yes
copy_action_cold_storage_after For copy operation, specifies the number of days after creation that a recovery point is moved to cold storage number n/a yes
copy_action_delete_after For copy operation, specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than copy_action_cold_storage_after number n/a yes
delete_after Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold_storage_after number n/a yes
delimiter Delimiter to be used between namespace, environment, stage, name and attributes. Defaults to - (hyphen). Set to "" to use no delimiter at all. string n/a yes
destination_vault_arn An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup string n/a yes
enabled Set to false to prevent the module from creating any resources bool n/a yes
environment Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' string n/a yes
id_length_limit Limit id to this many characters. Set to 0 for unlimited length. Set to null for default, which is 0. Does not affect id_full. number n/a yes
kms_key_arn The server-side encryption key that is used to protect your backups string n/a yes
label_order The naming order of the id output and Name tag. Defaults to ["namespace", "environment", "stage", "name", "attributes"]. You can omit any of the 5 elements, but at least one must be present. list(string) n/a yes
name Solution name, e.g. 'app' or 'jenkins' string n/a yes
namespace Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' string n/a yes
regex_replace_chars Regex to replace chars with empty string in namespace, environment, stage and name. If not set, "/[^a-zA-Z0-9-]/" is used to remove all characters other than hyphens, letters and digits. string n/a yes
schedule A CRON expression specifying when AWS Backup initiates a backup job string n/a yes
stage Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' string n/a yes
start_window The amount of time in minutes before beginning a backup. Minimum value is 60 minutes number n/a yes
additional_tag_map Additional tags for appending to tags_as_list_of_maps. Not added to tags. map(string) {} no
attributes Additional attributes (e.g. 1) list(string) [] no
context Single object for setting entire context at once. See description of individual variables for details. Leave string and numeric variables as null to use default value. Individual variable settings (non-null) override settings in context object, except for attributes, tags, and additional_tag_map, which are merged.
object({
enabled = bool
namespace = string
environment = string
stage = string
name = string
delimiter = string
attributes = list(string)
tags = map(string)
additional_tag_map = map(string)
regex_replace_chars = string
label_order = list(string)
id_length_limit = number
})
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_order": [],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {}
}
no
tags Additional tags (e.g. map('BusinessUnit','XYZ') map(string) {} no

Outputs

Name Description
backup_plan_arn Backup Plan ARN
backup_plan_version Unique, randomly generated, Unicode, UTF-8 encoded string that serves as the version ID of the backup plan
backup_selection_id Backup Selection ID
backup_vault_arn Backup Vault ARN
backup_vault_id Backup Vault ID
backup_vault_recovery_points Backup Vault recovery points

Related Projects

You can find more Terraform Modules by vising the link.

Additionally, check out these other related, and maintained projects.

Help

Got a question? We got answers.

File a Github issue, or message us on Slack

Contributors

Callum Robertson
Callum Robertson


README Footer

About

Terraform module to provision AWS Backup, a fully managed backup service that makes it easy to centralize and automate the back up of data across AWS services such as EBS volumes, RDS databases, DynamoDB tables, EFS file systems, and AWS Storage Gateway volumes.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 89.6%
  • Makefile 10.4%