Introduction to Terraback
What is Terraback?
Terraback is a multi-cloud CLI tool that reverse-engineers existing cloud infrastructure into clean, production-ready Terraform code. It scans your AWS, Azure, and GCP resources and generates properly formatted Terraform configurations with intelligent dependency discovery.
Transform legacy cloud environments into infrastructure-as-code in minutes, not months.
Key Features
- Fast Scanning: Scan entire cloud accounts in minutes with parallel processing
- Intelligent Dependencies: Automatic discovery and mapping of resource relationships
- Multi-Cloud Support: Full support for AWS, Azure, and GCP
- Production-Ready Output: Clean, formatted Terraform code following best practices
- Enterprise Modules: Organize generated code into reusable module structures
- Import Ready: Generate import commands to bring resources under Terraform control
Why Terraback?
The Problem
Migrating existing cloud infrastructure to Terraform is painful:
- Manual Documentation: Writing Terraform for existing resources is tedious and error-prone
- Hidden Dependencies: Resources have complex relationships that are hard to discover manually
- Time Consuming: Large environments can take weeks or months to document
- Inconsistent Output: Manual efforts produce inconsistent, hard-to-maintain code
The Solution
Terraback automates the reverse-engineering process:
- Scan: Point Terraback at your cloud account and scan resources
- Generate: Get clean Terraform code with proper formatting and dependencies
- Import: Use generated import commands to bring resources into Terraform state
- Manage: Your infrastructure is now under Terraform control
Core Concepts
Resource Scanning
Terraback connects to your cloud provider APIs (read-only) and discovers:
- Resource configurations and settings
- Tags and metadata
- Relationships between resources
- Current state of your infrastructure
Terraform Generation
For each discovered resource, Terraback generates:
- Properly formatted
.tffiles using Jinja2 templates - Import commands for state migration
- Provider configuration
- Variable definitions where appropriate
Dependency Discovery
The --with-deps flag enables intelligent dependency mapping:
- Discovers related resources automatically
- Maps parent-child relationships
- Handles cross-service dependencies (e.g., EC2 to VPC to Security Groups)
- Generates resources in the correct order
Enterprise Modules
The --enterprise-modules flag organizes output into a production-ready structure:
- Logical grouping by service type
- Auto-generated
variables.tfandoutputs.tf - README documentation per module
- Environment-specific configurations
Supported Cloud Providers
Terraback ships 240+ resource types across the three major clouds.
AWS (80+ resource types)
Core infrastructure, compute, networking, storage, databases, serverless, containers, monitoring, and security services.
Azure (80+ resource types)
Virtual machines, networking, storage, databases, containers, app services, and monitoring.
GCP (80+ resource types)
Compute, networking, storage, databases, containers, serverless, and monitoring.
Licensing
Terraback offers two tiers:
| Feature | Community (Free) | Professional ($499) |
|---|---|---|
| Core resources (VPC, EC2, S3, VMs, etc.) | Unlimited | Unlimited |
| Advanced services (RDS, Lambda, ECS, etc.) | - | Full access |
Dependency scanning (--with-deps) | - | Yes |
Enterprise modules (--enterprise-modules) | - | Yes |
Parallel scanning (--parallel N) | - | Yes |
| Variable extraction & environment detection | - | Yes |
| Support | Community | Priority email |
Getting Started
Ready to convert your infrastructure to Terraform? Here's how to begin:
- Install Terraback:
pip install terraback - Configure Credentials: Set up AWS/Azure/GCP authentication
- Scan: Run
terraback scan all aws -r us-east-1 -o ./output - Import: Use generated import commands to bring resources into Terraform
Continue to the Installation Guide to get started.
Support & Community
Resources
- Documentation: Comprehensive guides and references
- Email Support: contact@terraback.io — report issues and request features
Professional License
Get full access to all features with a Professional license:
- All cloud services across AWS, Azure, and GCP
- Dependency scanning and enterprise modules
- Parallel scanning for faster results
- Priority email support
Visit Licensing for more information.