Terraback: A tool for infrastructure scanning and backup.
Project description
๐ Terraback
Multi-Cloud Infrastructure as Code Tool
Terraback is an advanced CLI tool that reverse-engineers existing cloud infrastructure into clean, production-ready Terraform code with intelligent dependency discovery.
Transform legacy cloud environments into infrastructure-as-code in minutes, not months.
โจ Why Terraback?
- ๐ฏ 90% Faster: Reduce infrastructure documentation time from weeks to hours
- ๐ง Intelligent Discovery: Automatic dependency mapping across 50+ cloud services
- ๐ข Enterprise-Ready: Production-ready templates with lifecycle management
- โ๏ธ Multi-Cloud: Full support for AWS and Azure, with GCP coming soon
- ๐ Security-First: Read-only permissions, no credential storage, enterprise compliance
๐ Features
๐ Comprehensive Cloud Coverage
Core Infrastructure (Community Edition - Free):
- AWS: EC2 Instances, VPCs, Subnets, Security Groups, S3 Buckets, IAM Roles
- Azure: Virtual Machines, Virtual Networks, Subnets, Network Security Groups, Storage Accounts
- GCP: Compute Instances, Networks, Subnets, Storage Buckets
- Basic Commands: list, import, scan
- โจ Unlimited core resources
- Basic dependency mapping
Advanced Services (Migration Pass & Enterprise):
AWS Services:
- Container Platform: ECS Clusters, Services, Task Definitions, ECR Repositories
- Advanced Networking: CloudFront CDN, Route 53 DNS, NAT/Internet Gateways, VPC Endpoints
- Database & Caching: RDS instances, ElastiCache Redis/Memcached clusters
- Monitoring & Security: CloudWatch, Auto Scaling, ACM Certificates
- Serverless & APIs: Lambda Functions, API Gateway, SQS, SNS
- Storage: EFS, EBS Volumes/Snapshots, S3 advanced features
- Load Balancing: ALB/NLB with advanced features, listener rules, SSL policies
Azure Services:
- Compute: Virtual Machines with OS detection, Managed Disks, SSH Keys
- Networking: Virtual Networks, Subnets with delegations, NSGs with rules
- Storage: Storage Accounts with blob properties, static websites, encryption
- Load Balancing: Application Gateway, Load Balancers
- Database: Azure SQL, Cosmos DB
- Container: AKS, Container Instances
GCP Services:
- Compute: VM Instances, Persistent Disks, Machine Images
- Networking: VPC Networks, Subnets, Firewall Rules
- Storage: Cloud Storage, Persistent Disks
- Container: GKE Clusters, Node Pools
๐ Intelligent Dependency Discovery
The --with-deps flag automatically discovers and maps complete infrastructure stacks:
# AWS Example
terraback ec2 scan --with-deps
# Automatically finds and scans:
# โโโ VPC and networking (subnets, security groups)
# โโโ Load balancers (ALB, target groups, listeners)
# โโโ Storage (EBS volumes, snapshots)
# โโโ Security (IAM roles, certificates)
# โโโ Monitoring (CloudWatch logs, alarms)
# โโโ All interconnected dependencies
# Azure Example
terraback vm scan --with-deps
# Automatically finds and scans:
# โโโ Virtual Networks and Subnets
# โโโ Network Security Groups with rules
# โโโ Managed Disks and Snapshots
# โโโ Network Interfaces and Public IPs
# โโโ Storage Accounts
# โโโ All interconnected dependencies
๐ Advanced Features
- Performance Optimization: API response caching, parallel scanning, smart dependency resolution
- Multi-Account/Subscription: Scan across multiple AWS accounts or Azure subscriptions
- Module Generation: Create reusable Terraform modules automatically
- State Management: Import existing resources directly into Terraform state
- Compliance Ready: Generate code following HashiCorp and cloud provider best practices
๐ฆ Installation
Prerequisites
- Python 3.8+ (for pip installation)
- Terraform 1.0+ (for import functionality)
- Cloud CLI tools:
- AWS:
awsCLI configured - Azure:
azCLI configured and logged in - GCP:
gcloudCLI configured
- AWS:
Install via pip (Recommended)
pip install terraback
Install via Binary
Linux/macOS:
# Linux
curl -L https://dist.terraback.dev.io/releases/latest/terraback-linux -o terraback
chmod +x terraback
sudo mv terraback /usr/local/bin/
# macOS
curl -L https://dist.terraback.dev.io/releases/latest/terraback-macos -o terraback
chmod +x terraback
sudo mv terraback /usr/local/bin/
Windows: Download from releases
๐ Quick Start
AWS Scanning
# Configure AWS credentials (if not already done)
aws configure
# Scan EC2 instances
terraback ec2 scan
# Scan VPC with all dependencies
terraback vpc scan --with-deps
# Scan specific region
terraback ec2 scan --region eu-west-1
# Scan with specific profile
terraback s3 scan --profile production
Azure Scanning
# Login to Azure (if not already done)
az login
# Scan Virtual Machines
terraback vm scan
# Scan entire resource group
terraback vm scan --resource-group production-rg
# Scan specific subscription
terraback vnet scan --subscription-id YOUR-SUBSCRIPTION-ID
# Scan with location filter
terraback storage scan --location westeurope
Multi-Cloud Commands
# Scan all resources (cloud-specific)
terraback scan-all aws --region us-east-1
terraback scan-all azure --resource-group my-rg
# Check authentication status
terraback auth-check
# Use caching for large infrastructures
terraback scan-recursive ec2 --use-cache --cache-ttl 120
terraback scan-recursive vm --use-cache --parallel-workers 10
๐ Supported Resources
AWS Resources (Full Support)
| Service | Resources | Status |
|---|---|---|
| EC2 | Instances, Volumes, Snapshots, AMIs, Key Pairs, Launch Templates, Network Interfaces | โ Full Support |
| VPC | VPCs, Subnets, Security Groups, Internet/NAT Gateways, Route Tables, VPC Endpoints | โ Full Support |
| IAM | Roles, Policies, Instance Profiles | โ Full Support |
| S3 | Buckets, Versioning, Lifecycle, ACLs, Policies | โ Full Support |
| RDS | Instances, Subnet Groups, Parameter Groups | โ Full Support |
| Load Balancing | ALB, NLB, CLB, Target Groups, Listeners, SSL Policies | โ Full Support |
| Lambda | Functions, Layers, Permissions | โ Full Support |
| Route 53 | Hosted Zones, Records | โ Full Support |
| CloudWatch | Log Groups, Alarms, Dashboards | โ Full Support |
| Auto Scaling | Groups, Launch Templates, Policies | โ Full Support |
| ECS/ECR | Clusters, Services, Task Definitions, Repositories | โ Full Support |
| CloudFront | Distributions, Origin Access Controls, Cache Policies | โ Full Support |
| ElastiCache | Redis/Memcached Clusters, Parameter Groups | โ Full Support |
| ACM | Certificates | โ Full Support |
| EFS | File Systems, Mount Targets, Access Points | โ Full Support |
| API Gateway | REST APIs, Resources, Methods, Deployments | โ Full Support |
| SQS/SNS | Queues, Topics, Subscriptions | โ Full Support |
| Secrets Manager | Secrets, Versions | โ Full Support |
| Systems Manager | Parameters, Documents | โ Full Support |
Azure Resources
| Service | Resources | Status |
|---|---|---|
| Compute | Virtual Machines, Managed Disks, Availability Sets, SSH Keys | โ Full Support |
| Networking | Virtual Networks, Subnets, Network Security Groups, Network Interfaces | โ Full Support |
| Storage | Storage Accounts, Blob Storage, File Shares | โ Full Support |
| Load Balancing | Load Balancers, Application Gateways | โ Full Support |
| Database | SQL Database, Cosmos DB | โ Full Support |
| Container | AKS, Container Instances | โ Full Support |
| Identity | Managed Identities, Service Principals | โ Full Support |
GCP Resources
| Service | Resources | Status |
|---|---|---|
| Compute Engine | Instances, Disks, Images | โ Full Support |
| VPC | Networks, Subnets, Firewalls | โ Full Support |
| Cloud Storage | Buckets, Objects | โ Full Support |
| GKE | Clusters, Node Pools | โ Full Support |
๐ฏ Advanced Usage
Dependency Scanning
# AWS: Scan EC2 with all dependencies
terraback ec2 scan --with-deps --output-dir ./infrastructure
# Azure: Scan VM with all dependencies
terraback vm scan --with-deps --output-dir ./infrastructure
# Result: Complete infrastructure graph
# โโโ compute/
# โ โโโ instances.tf
# โ โโโ launch_templates.tf
# โโโ networking/
# โ โโโ vpc.tf
# โ โโโ subnets.tf
# โ โโโ security_groups.tf
# โโโ storage/
# โโโ volumes.tf
# โโโ snapshots.tf
Caching & Performance
# Enable caching for large infrastructures
terraback scan-recursive ec2 --use-cache --cache-ttl 60
# View cache statistics
terraback cache stats
# Clear cache
terraback cache clear
# Parallel scanning
terraback scan-recursive vm --parallel-workers 10
Import to Terraform
# List discovered resources
terraback list all
# Import specific resource
terraback ec2 import i-1234567890abcdef0
# Import Azure VM
terraback vm import /subscriptions/xxx/resourceGroups/my-rg/providers/Microsoft.Compute/virtualMachines/my-vm
โ๏ธ License & Pricing
Terraback uses a multi-tier licensing model:
Community Edition (Free)
- โ Core resources for AWS, Azure, GCP
- โ EC2, VPC, S3 (AWS)
- โ VMs, VNets, Storage (Azure)
- โ Compute, Networks, Storage (GCP)
- โ โจ Unlimited core resources
- โ Basic dependency mapping
- โ Community support via GitHub
- โ Advanced services (RDS, Lambda, etc.)
- โ Multi-account support
Migration Pass ($299 per user/business for 3 months)
- โ All 50+ cloud services
- โ Unlimited resources & accounts
- โ Advanced dependency mapping
- โ Multi-account/subscription scanning
- โ RDS, Lambda, EKS, and more
- โ Module generation & best practices
- โ State file management
- โ Priority email support
- โ Migration planning assistance
- โ API access for automation
Enterprise Edition (Coming Soon)
- โ Everything in Migration Pass
- โ Annual/multi-year licensing
- โ SSO integration (SAML, OIDC)
- โ Custom resource scanners
- โ On-premise deployment options
- โ SLA with guaranteed uptime
- โ Dedicated training & onboarding
- โ Dedicated customer success manager
- โ Volume licensing & team management
- โ Compliance reporting
๐ Documentation
- Full Documentation
- AWS Scanning Guide
- Azure Scanning Guide
- GCP Scanning Guide
- API Reference
- Examples & Tutorials
๐ Troubleshooting
AWS Issues
# Check AWS credentials
aws sts get-caller-identity
# Use specific profile
export AWS_PROFILE=production
# Debug mode
terraback ec2 scan --debug
Azure Issues
# Check Azure login
az account show
# Set subscription
az account set --subscription "My Subscription"
# List available subscriptions
az account list --output table
Common Issues
- Permission Denied: Ensure your cloud credentials have read access to resources
- Rate Limiting: Use
--use-cacheflag for large infrastructures - Module Not Found: Install with
pip install -e .for development
๐ Roadmap
- AWS support (50+ services)
- Azure support (Core services)
- GCP support (Core services)
- Terraform module generation
- Web UI dashboard
- CI/CD integrations
๐ Support
- Community: GitHub Discussions
- Issues & Feature Requests: GitHub Issues
- Professional Support: support@terraback.io
- Enterprise Sales: sales@terraback.io
๐ Acknowledgments
Built with โค๏ธ by DevOps engineers who understand the pain of manual cloud documentation.
Copyright ยฉ 2025 Terraback
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terraback_community-0.2.4.tar.gz.
File metadata
- Download URL: terraback_community-0.2.4.tar.gz
- Upload date:
- Size: 172.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47f31f49da5006ddc4782a7571508c0fa79cf77fb7708cccebb2bf21a329f3d8
|
|
| MD5 |
1703cfdd824fbc54b9a601eb6f8a30e5
|
|
| BLAKE2b-256 |
5afd1f40ccd3a7eb780c058829a2293ec7cd23c71182ad1ba3c4c3bd380091d6
|
File details
Details for the file terraback_community-0.2.4-py3-none-any.whl.
File metadata
- Download URL: terraback_community-0.2.4-py3-none-any.whl
- Upload date:
- Size: 225.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
081adaf2770fd249ac107718ca3d5828f55e311877243e01ee9bcc731fba835b
|
|
| MD5 |
1c294266d7403ec3aed87d57cfdb74c2
|
|
| BLAKE2b-256 |
3178cf22a9906501eac89ba39e8ee3abe167e0905fda9cc26f8aad5130e8205b
|