
terraform-aws-arc-backup¶
Module:
sourcefuse/arc-backup/awsRegistry: https://registry.terraform.io/modules/sourcefuse/arc-backup/aws
Category: Storage / Data Protection
Source: https://github.com/sourcefuse/terraform-aws-arc-backup
Tip
🤖 New: Use this module with AI assistants via the ARC IaC MCP Server — search, scaffold, and security-scan ARC modules from natural language. Quick setup ↓
Overview¶
Centralizes AWS Backup configuration — vaults, plans, schedules, and resource selections — with optional vault lock and KMS encryption.
What It Does¶
- Backup vault with optional KMS encryption
- Backup plans with cron schedules and lifecycle policies
- Resource selection by ARN or tag-based filters
- Vault lock in governance or compliance mode
- Cross-region copy actions
- IAM role for backup and restore
For more information about this repository and its usage, please see Terraform AWS Backup Usage Guide.
Quickstart¶
SourceFuse's AWS Reference Architecture (ARC) Terraform module centralizes and automates the backup of data across AWS services such as Amazon RDS, EBS, DynamoDB, EFS, and more. It allows you to schedule automated backups, and manage and monitor backup activity from a single console, ensuring compliance and data protection. AWS Backup also supports cross-region and cross-account backup capabilities for enhanced data durability and disaster recovery.
Prerequisites¶
Before using this module, ensure you have the following:
- AWS credentials configured.
- Terraform installed.
- A working knowledge of Terraform.
Getting Started¶
- Define the Module
Initially, it's essential to define a Terraform module, which is organized as a distinct directory encompassing Terraform configuration files. Within this module directory, input variables and output values must be defined in the variables.tf and outputs.tf files, respectively. The following illustrates an example directory structure:
- Define Input Variables
Inside the variables.tf or in *.tfvars file, you should define values for the variables that the module requires.
- Use the Module in Your Main Configuration In your main Terraform configuration file (e.g., main.tf), you can use the module. Specify the source of the module, and version, For Example
Required Inputs¶
| Name | Type | Description |
|---|---|---|
tags |
map(string) |
Tags applied to all backup resources |
| ## Key Outputs |
| Name | Description |
|---|---|
backup_plan_id |
AWS Backup plan ID |
vault_arn |
ARN of the backup vault |
| ## Full Variable & Output Reference |
The complete inputs/outputs reference is auto-generated below.
- .tfvars
Inside the .tfvars file of the module, you can provide desired values that can be referenced in the main configuration. For example:
Edit the locals.tf file and provide desired values.
backup_plan - variable is used to define Backup plan and lifecycle policies.
backup_vault_data - Defines where backup has to be stored
backup_selection_data - Which all resources needs backup
First Time Usage¶
uncomment the backend block in main.tf
terraform init should be fine
Create a dev workspace
Plan Terraform
Apply Terraform
Production Setup¶
Create a prod workspace
Plan Terraform
Apply Terraform
Cleanup¶
Destroy Terraform
Requirements¶
| Name | Version |
|---|---|
| terraform | >= 1.4, < 2.0.0 |
| aws | >= 5.0, < 6.0 |
Providers¶
| Name | Version |
|---|---|
| aws | 5.49.0 |
Modules¶
| Name | Source | Version |
|---|---|---|
| backup_vault | ./modules/backup-vault | n/a |
Resources¶
| Name | Type |
|---|---|
| aws_backup_plan.this | resource |
| aws_backup_selection.this | resource |
| aws_backup_vault_lock_configuration.this | resource |
| aws_iam_role.this | resource |
| aws_iam_role_policy_attachment.aws_backup_policy_backup_attachment | resource |
| aws_iam_role_policy_attachment.aws_backup_policy_restore_attachment | resource |
| aws_iam_role.this | data source |
Inputs¶
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| backup_plan | Rules for AWS backup plan, null act as flag to enable or disable backup plan | object({ |
null |
no |
| backup_selection_data | (optional) Backup selection criteria to select resources | object({ |
null |
no |
| backup_vault_data | Details to create backup vault, null act as flag to enable or disable | object({ |
null |
no |
| create_role | (optional) Role Required for taking backup and restore | bool |
true |
no |
| role_name | IAM role name | string |
null |
no |
| tags | Tags for AWS backup service | map(string) |
n/a | yes |
| vault_lock_configuration | (optional) Vault lock configuration , changeable_for_days > 0 , then its governance else compliance mode |
object({ |
null |
no |
Outputs¶
| Name | Description |
|---|---|
| backup_plan_id | AWS backups plan ID |
| backup_role_arn | n/a |
| backup_role_name | n/a |
| vault_arn | ARN of Vault |
Versioning¶
This project uses a .version file at the root of the repo which the pipeline reads from and does a git tag.
When you intend to commit to main, you will need to increment this version. Once the project is merged,
the pipeline will kick off and tag the latest git commit.
Development¶
Prerequisites¶
Configurations¶
- Configure pre-commit hooks
Versioning¶
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
Tests¶
- Tests are available in
testdirectory - Configure the dependencies
- Now execute the test
AI Assistant Integration (ARC IaC MCP)¶
The ARC IaC MCP Server is a hosted Model Context Protocol service that lets AI assistants browse, search, scaffold, compare, and security-scan any of the SourceFuse ARC Terraform modules — directly from natural language.
What you can do with it:
- Discover — search and filter modules by keyword or AWS resource type.
- Understand — get inputs, outputs, and resources for any module without leaving your editor.
- Scaffold — generate production-ready, multi-file Terraform with cross-module wiring already done.
- Secure — scan generated or existing HCL for misconfigurations before it hits a PR.
- Compare — diff modules side-by-side to make informed architectural decisions.
Setup (one minute)¶
The MCP endpoint is https://arc-iac-mcp.sourcef.us/mcp. Pick your client:
Claude Code CLI:
Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Cursor / Windsurf / Kiro — add the same block to .cursor/mcp.json (or the equivalent for your client).
Example prompts to try¶
- "List all ARC modules sorted by downloads"
- "What inputs does
arc-ecsrequire?" - "Scaffold a production-ready
arc-dbAurora setup with Secrets Manager" - "Compare
arc-eksandarc-ecsfor running 10 microservices" - "Scan this Terraform before I raise a PR:
<paste HCL>"
See the ARC IaC MCP repo for the full tool reference, troubleshooting tips, and local-development instructions.
Contributing¶
See CONTRIBUTING.md for commit conventions and development setup.
Authors¶
This project is authored by: - SourceFuse ARC Team