Skip to content

Coalfire-CF/terraform-aws-backup

Repository files navigation

Coalfire

AWS Backup Terraform Module

Description

The AWS backup module creates backup resources for your project.

FedRAMP Compliance: High

Dependencies

  • KMS key for AWS Backup

Resource List

Resources that are created as a part of this module include:

  • AWS backup vault
  • AWS backup plan
  • AWS IAM for backup

Deployment Steps

This module can be called as outlined below:

  • Change directories to the terraform-aws-backup directory.
  • From the terraform-aws-backup directory run terraform init.
  • Run terraform plan to review the resources being created.
  • If everything looks correct in the plan output, run terraform apply.

Usage

module "aws-backup" {
  source = "github.com/Coalfire-CF/terraform-aws-backup"

  partition = var.partition
  aws_region = var.region
  account_number = var.account_id
  resource_prefix = var.resource_prefix
  backup_kms_arn = var.backup_kms_arn
  delete_after = 14

  backup_rule_name = var.backup_rule_name
  backup_vault_name = var.backup_vault_name
  backup_plan_name = var.backup_plan_name
  backup_selection_tag_value = var.backup_selection_tag_value

}

Requirements

Name Version
terraform >=1.5.0
aws ~> 5.0

Providers

Name Version
aws ~> 5.0

Modules

No modules.

Resources

Name Type
aws_backup_plan.default-policy-backup-plan resource
aws_backup_selection.default-policy-backup-selection resource
aws_backup_vault.backup-vault resource
aws_iam_role.backup-iam-role resource
aws_iam_role_policy.backups-pass-role resource
aws_iam_role_policy_attachment.backup-backups-iam-attach resource
aws_iam_role_policy_attachment.backup-restores-iam-attach resource
aws_iam_policy_document.backups-pass-role-policy data source

Inputs

Name Description Type Default Required
account_number The AWS account number resources are being deployed into string n/a yes
aws_region The AWS region to create resources in string n/a yes
backup_kms_arn The kms key ARN for AWS backup string n/a yes
backup_plan_name AWS backup plan name string n/a yes
backup_rule_name AWS backup rule name string n/a yes
backup_schedule AWS backup cron schedule string "cron(0 3 ? * * *)" no
backup_selection_tag_value AWS backup selection tag value string n/a yes
backup_vault_name AWS backup vault name string n/a yes
delete_after Delete backups after defined number of days number 14 no
partition The AWS partition to use string n/a yes
resource_prefix The prefix for the s3 bucket names string n/a yes

Outputs

Name Description
backup_vault_arn n/a
backup_vault_id n/a

Contributing

If you're interested in contributing to our projects, please review the Contributing Guidelines. And send an email to our team to receive a copy of our CLA and start the onboarding process.

License

License

Copyright

Copyright © 2023 Coalfire Systems Inc.