Terraform module designed to easily backup resources using AWS Backup.
Plans determine when to make a backup and for how long this backup should be retained. The backups are securely stored in a seperate vault and encrypted with a KMS key.
By default, the following rules are defined:
When | To cold storage after (days) | Deleted after (days) |
---|---|---|
Daily at 0:00 | - | 35 |
Weekly at Sunday 0:00 | - | 90 |
Monthly at first day of month 0:00 | 90 | 730 |
It's 100% Open Source and licensed under the MIT.
This project is available on the Terraform Registry
Include this module in your existing terraform code:
module "backup" {
source = "kabisa/backup/aws"
#Use the latest version from the Terraform Registry
version = "0.1.0"
daily_cron = "cron(0 0 * * ? *)" # optional
daily_delete_after = 35 # optional
weekly_cron = "cron(0 0 ? * 1 *)" # optional
weekly_delete_after = 90 # optional
monthly_cron = "cron(0 0 1 * ? *)" # optional
monthly_delete_after = 730 # optional
monthly_cold_storage_after = 90 # optional
namespace = "my_company"
name = "my_project_name"
stage = "staging_production_etc"
tags = {
My_custom_tag_1: "my_custom_value_1"
My_custom_tag_2: "my_custom_value_2"
}
backup_resource_ids = [
"arn_of_my_resource_1",
"arn_of_my_resource_2"
]
}
Available targets:
help Help screen
help/all Display help for all targets
help/short This help short screen
lint Lint terraform code
Name | Description | Type | Default | Required |
---|---|---|---|---|
backup_resource_ids | List of resource id's or ARNs you would like to include in the backup | list | <list> |
yes |
name | Solution name, e.g. 'app' or 'jenkins' | string | - | no |
namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | string | - | no |
region | (no description specified) | string | - | no |
stage | Stage (e.g. prod , dev , staging ) |
string | - | no |
tags | Additional tags (e.g. map(BusinessUnit ,XYZ ) |
map(string) | <map> |
no |
Name | Description |
---|---|
key_id | ID of the KMS key created to encrypt the backup vault |
key_arn | ARN of the KMS key created to encrypt the backup vault |
Like this project? Please give it a ★ on our GitHub! (it helps us a lot)
Are you using this project or any of our other projects? Consider sharing this project:
Got a question?
File a GitHub issue, or send us an email.
At Kabisa we believe in the power of AWS in combination with Infrastructure as Code. Our DevOps Engineers are AWS certified and as a result of our expertise and experience we are official AWS partner Standard.
Struggling with Terraform our just need an extra hand? Contact us at:
Please use the issue tracker to report any bugs or file feature requests.
If you are interested in being a contributor and want to get involved in developing this project or help out with our other projects, we would love to hear from you! Shoot us an email.
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull Request so that we can review your changes
NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!
Copyright © 2019 Kabisa B.V
See LICENSE for full details.
All other trademarks referenced herein are the property of their respective owners.
This project is maintained and funded by Kabisa B.V. Like it? Please let us know by leaving a comment!
-backup&body=https://github.com/kabisa/terraform-aws-backup