Skip to main content

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: aws CLI configured
    • Azure: az CLI configured and logged in
    • GCP: gcloud CLI configured

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


๐Ÿ› 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

  1. Permission Denied: Ensure your cloud credentials have read access to resources
  2. Rate Limiting: Use --use-cache flag for large infrastructures
  3. 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


๐Ÿ™ Acknowledgments

Built with โค๏ธ by DevOps engineers who understand the pain of manual cloud documentation.


Copyright ยฉ 2025 Terraback

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terraback_community-0.2.1.tar.gz (173.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terraback_community-0.2.1-py3-none-any.whl (226.2 kB view details)

Uploaded Python 3

File details

Details for the file terraback_community-0.2.1.tar.gz.

File metadata

  • Download URL: terraback_community-0.2.1.tar.gz
  • Upload date:
  • Size: 173.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for terraback_community-0.2.1.tar.gz
Algorithm Hash digest
SHA256 71b800f26cbbed64ffdb819fc07b7c9bffdfd03c4406d6ee1dc292c5ac67e9da
MD5 cda93540652784b26ba91ce6079524e7
BLAKE2b-256 d896d76351c5d5a3f9ad5613fbeff6215dfc113536986a4caa2579858b28eb61

See more details on using hashes here.

File details

Details for the file terraback_community-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for terraback_community-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb751b09f03176cfef20a2e433f9aa5aa2cf3ac9eb3c83d40e4ff0c741510fd8
MD5 f4092cecc99e90be8c70efb37739f09d
BLAKE2b-256 3a91d8de1e206e175c7763c053bd2c820446616acb07e9b3a761755cd683d834

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page