Troubleshooting Guide
Installation Issues
Command not found after installation
Symptoms:
terraback: command not found
Solutions:
- Verify pip installation location:
pip show terraback
- Check if the install location is in PATH:
# Find where pip installs scripts
python -m site --user-base
# Add to PATH if needed (Linux/macOS)
export PATH=$PATH:$(python -m site --user-base)/bin
- Try reinstalling:
pip uninstall terraback
pip install terraback
Python version error
Symptoms:
Error: Python 3.8 or higher required
Solution: Install Python 3.8+ from python.org or use pyenv:
pyenv install 3.11
pyenv global 3.11
pip install terraback
Permission denied during installation
Symptoms:
Error: Permission denied
Solutions:
# Option 1: Use virtual environment (recommended)
python -m venv terraback-env
source terraback-env/bin/activate
pip install terraback
# Option 2: Install for user only
pip install --user terraback
Authentication Issues
AWS credentials not found
Symptoms:
Error: Unable to locate credentials
Solutions:
- Configure AWS CLI:
aws configure
- Or set environment variables:
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_DEFAULT_REGION="us-east-1"
- Verify credentials:
aws sts get-caller-identity
Azure authentication failed
Symptoms:
Error: Azure authentication failed
Solutions:
- Login with Azure CLI:
az login
- Or use service principal:
export AZURE_CLIENT_ID="your-client-id"
export AZURE_CLIENT_SECRET="your-client-secret"
export AZURE_TENANT_ID="your-tenant-id"
export AZURE_SUBSCRIPTION_ID="your-subscription-id"
- Verify authentication:
az account show
GCP authentication failed
Symptoms:
Error: GCP authentication failed
Solutions:
- Login with gcloud:
gcloud auth application-default login
- Or use service account:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
- Verify authentication:
gcloud auth list
Scanning Issues
No resources found
Symptoms:
No resources found in region us-east-1
Solutions:
- Verify you're scanning the correct region:
# Check which regions have resources
aws ec2 describe-instances --query 'Reservations[].Instances[].Placement.AvailabilityZone'
- Check permissions - you need read access:
# AWS: Ensure you have ReadOnlyAccess or equivalent
aws iam get-user
- Try scanning a specific service:
terraback aws s3 scan --output-dir ./output # S3 is global
Permission denied during scan
Symptoms:
Error: Access Denied when calling DescribeInstances
Solutions:
- Check IAM permissions:
aws iam list-attached-user-policies --user-name your-username
-
Ensure you have at least
ReadOnlyAccesspolicy or equivalent permissions for the services you're scanning. -
For specific services, check the required permissions in AWS documentation.
API rate limiting / throttling
Symptoms:
Error: Rate exceeded
Error: Throttling
Solutions:
- Reduce parallel workers:
terraback scan all aws -r us-east-1 --parallel 2 -o ./output
- Enable caching to reduce API calls (caching is opt-in via
--cache, off by default):
# First scan with --cache populates the cache
terraback scan all aws -r us-east-1 --cache -o ./output
# Subsequent scans with --cache reuse it (within the 60 minute TTL)
terraback scan all aws -r us-east-1 --cache -o ./output
- Scan specific services instead of all:
terraback aws ec2 scan-instances -r us-east-1 -o ./output
terraback aws s3 scan -o ./output
Scan timeout
Symptoms:
Error: Operation timed out
Solutions:
- Scan specific services instead of all resources
- Reduce parallel workers
- Try scanning during off-peak hours
- Check network connectivity
License Issues
License activation failed
Symptoms:
Error: License activation failed
Error: Invalid license key
Solutions:
- Verify license key format (should be XXXX-XXXX-XXXX-XXXX):
terraback license activate XXXX-XXXX-XXXX-XXXX
-
Check internet connectivity - activation requires online validation
-
Verify you're using the correct license key from your email
-
Contact support if issue persists: contact@terraback.io
License not found
Symptoms:
Error: No valid license found
Feature requires Professional license
Solutions:
- Check license status:
terraback license status
- Re-activate if needed:
terraback license activate YOUR-LICENSE-KEY
- License file location:
- Linux/macOS:
~/.terraback/license.jwt - Windows:
%USERPROFILE%\.terraback\license.jwt
- Linux/macOS:
Output Issues
Generated Terraform has errors
Symptoms:
Error: Invalid resource configuration
Solutions:
- Validate generated files:
cd ./output
terraform init
terraform validate
- Check for missing dependencies - use
--with-depsflag:
terraback aws ec2 scan-instances --with-deps -r us-east-1 -o ./output
- Review generated code for any cloud-specific issues
Import fails
Symptoms:
Error: Resource already managed by Terraform
Error: Cannot import non-existent resource
Solutions:
- Ensure resource exists in cloud:
aws ec2 describe-instances --instance-ids i-1234567890abcdef0
- Check if resource is already in state:
terraform state list
- Remove from state if re-importing:
terraform state rm aws_instance.example
terraform import aws_instance.example i-1234567890abcdef0
Cache Issues
Stale data in scans
Symptoms: Resources showing old configurations or deleted resources still appearing.
Solutions:
- Clear the cache:
terraback cache clear
- Invalidate specific service cache:
terraback cache invalidate --service ec2
- Check cache statistics:
terraback cache stats
Debug Mode
Enable verbose logging
# Set environment variables
export TERRABACK_LOG_LEVEL=DEBUG
export TERRABACK_LOG_FILE=/tmp/terraback.log
# Or use verbose flag
terraback aws ec2 scan-instances -v -r us-east-1 -o ./output
View debug logs
# Check log file
cat /tmp/terraback.log
# Or use tail for live viewing
tail -f /tmp/terraback.log
Getting Help
Before contacting support
- Verify authentication:
terraback scan auth-check
-
Enable debug logging and capture the error
-
Note the specific command and error message
Support channels
- Documentation: docs.terraback.io
- Email: contact@terraback.io — report bugs and request features
Information to include
When reporting issues, include:
- Python version (
python --version) - Operating system
- Cloud provider and service
- Full error message
- Steps to reproduce