Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>TerraformAI (Beta)New to Visual Studio Code?Β Get it now.
TerraformAI (Beta)

TerraformAI (Beta)

cloudcraft

|
1 install
| (1) | Free
πŸš€ BETA: Transform Terraform plans into beautiful reports instantly! Basic reports working now, AI analysis coming soon. Save hours of documentation time.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🚀 TerraformAI - Instant Terraform Documentation

⚠️ BETA VERSION: Basic reports working perfectly! AI-powered analysis coming December 2025. Stop wasting 30+ minutes on manual documentation - generate beautiful reports in 2 seconds.

VS Code Marketplace Installs Rating License: MIT GitHub


🎉 BETA RELEASE - Basic Reports Working!

βœ… What's Working Now:

  • Beautiful basic report generation (2 seconds!)
  • Multiple export formats (Markdown, HTML, PDF)
  • VS Code right-click integration
  • 100% free, local processing
  • All cloud providers (AWS, Azure, GCP, etc.)

🔮 Coming Very Soon (AI Features):

  • AI-Powered risk analysis
  • Security insights and recommendations
  • Impact assessment
  • Intelligent deployment strategies

👉 See Sample Reports | Install Now


🎯 Two Ways to Use

1. 🔥 NEW: Simple CLI (Terraform Architect's Choice)

# Just like terraform plan, but with AI analysis!

# Windows (PowerShell)
.\terraformai.ps1 plan -var-file=prod.tfvars

# Linux/Mac (Bash - Recommended)
./terraformai.sh plan -var-file=prod.tfvars

# Cross-platform (Python)
./terraformai.py plan -var-file=prod.tfvars

# One command, auto-generates PDF report
# See: SIMPLE_CLI_README.md | CLI_OPTIONS.md

2. 🎨 VS Code Extension (Interactive)

Right-click terraform plan output β†’ "Generate Terraform Report"
Choose: AI-powered or Basic report

😫 The Problem Every Terraform User Faces

You're about to apply a critical infrastructure change...

  • ❌ Staring at 500+ lines of terminal output
  • ❌ Scrolling endlessly to find that one resource change
  • ❌ Your manager asks: "What exactly is changing?" and you scramble to copy-paste text
  • ❌ No clear way to review, share, or archive what's about to happen
  • ❌ Can't easily spot dangerous destroys buried in the noise
  • ❌ Wasting 30+ minutes manually documenting changes for approval

Sound familiar? You're not alone. Every DevOps engineer has been there.

✨ The Solution: AI-Powered Analysis + Beautiful Reports

🚀 For Terraform Architects (Simple CLI)

# One command - works exactly like terraform plan
.\terraformai.ps1 plan -var-file=prod.tfvars

# Output: 
# - Standard terraform plan (to console)
# - AI analysis PDF report (auto-generated)
# - Cost: ~2-8 credits ($0.02-0.08) per report

Features:

  • βœ… All terraform parameters work (var-file, var, target, etc.)
  • βœ… Perfect for CI/CD - same command in automation
  • βœ… No manual steps - plan β†’ report in one shot
  • βœ… AI-powered insights - Intelligent analysis when enabled

See: SIMPLE_CLI_README.md | ARCHITECT_FEEDBACK_IMPLEMENTED.md

🎨 For VS Code Users (Interactive Extension)

This VS Code extension transforms your Terraform plan chaos into crystal-clear, professional PDF reports that:

  • βœ… Highlight critical changes with color-coded actions (create βž•, modify 🔄, destroy ❌)
  • βœ… Organize everything in clean tables and sections
  • βœ… Export instantly to PDF for sharing with stakeholders
  • βœ… Work 100% offline - no external dependencies, no API calls
  • βœ… Save you hours of manual documentation every week

🎯 Why You NEED This Extension

For DevOps Engineers

  • 📋 Stop manually documenting - Generate change reports in 2 seconds
  • 👀 Spot dangerous changes instantly - Destroys are highlighted
  • 🚀 Speed up reviews - Clear, scannable format vs terminal soup
  • 📊 Track history - Archive reports for compliance and audits

For Team Leads

  • 👥 Approve changes confidently - See exactly what's changing without Terraform expertise
  • 📈 Improve team productivity - Eliminate back-and-forth questions
  • 🔒 Reduce risk - Better visibility = fewer production incidents

For Organizations

  • 📝 Meet compliance requirements - Documented change records for every deployment
  • 💰 Save money - Reduce time spent on change reviews by 80%
  • 🎓 Onboard faster - New team members understand changes easily

🚀 Quick Start

CLI (Simplest - Recommended for Automation)

# 1. Set API key (one time)
export TERRAFORM_REPORT_API_KEY="your-key"  # Linux/Mac
$env:TERRAFORM_REPORT_API_KEY = "your-key"  # Windows

# 2. Run terraform plan with AI
./terraformai.sh plan -var-file=prod.tfvars   # Linux/Mac (Bash)
.\terraformai.ps1 plan -var-file=prod.tfvars  # Windows (PowerShell)
./terraformai.py plan -var-file=prod.tfvars   # Cross-platform (Python)

# Done! Report auto-generated: Terraform_AI_Report_TIMESTAMP.pdf

VS Code Extension (Interactive)

  1. Install this extension from VS Code Marketplace
  2. Generate a Terraform plan: terraform plan > plan.txt
  3. Open plan.txt in VS Code
  4. Right-click β†’ Select Terraform: Generate Plan Report
  5. Done! Your beautiful PDF report is ready 🎉

Feature Comparison

Feature CLI (terraformai) VS Code Extension
AI Analysis βœ… Optional (when enabled) βœ… Optional (requires credits)
Basic Report ❌ βœ… Free offline parsing
One Command βœ… terraformai plan ❌ Multi-step
CI/CD Ready βœ… Perfect ⚠️ Possible but manual
All terraform params βœ… Yes ❌ Need separate plan step
PDF Output βœ… Auto (if pandoc) βœ… Auto
Cost Free (basic) Free (basic) or credits (AI)
Best For Automation, Architects Interactive review, Beginners

Recommendation: Use CLI for production workflows, VS Code for exploratory analysis.

📸 What You Get

Before: Terminal Chaos

Terraform will perform the following actions:

  # aws_instance.web will be created
  + resource "aws_instance" "web" {
      + ami                          = "ami-0c55b159cbfafe1f0"
      + arn                          = (known after apply)
      + associate_public_ip_address  = (known after apply)
      ...
      [200+ more lines of hard-to-read text]

After: Professional Report

📊 TERRAFORM PLAN REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 SUMMARY
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Resources to Add    β”‚   5   β”‚
β”‚ Resources to Change β”‚   2   β”‚
β”‚ Resources to Destroyβ”‚   0   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜

🚨 CRITICAL ACTIONS
None - Safe to proceed βœ“

βž• RESOURCES TO CREATE
1. aws_instance.web
   Type: EC2 Instance
   Changes: Initial creation...

📸 Sample Reports

See what you'll get! Sample reports are included with the extension for your reference.

🤖 AI-Enhanced Reports (Coming Soon!)

What you can expect from AI-powered analysis:

📊 AWS Infrastructure Sample - Click to see what AI analysis includes
🚨 AI Risk Assessment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Overall Risk Level: MEDIUM ⚠️

| Risk Category              | Level    | Details                           |
|---------------------------|----------|-----------------------------------|
| Infrastructure Impact     | 🟡 Medium | ASG changes affect availability   |
| Security Risk             | 🟢 Low    | Secrets Manager improves security |
| Cost Impact              | 🟡 Medium | +$145.20/month (mostly NAT)       |
| Rollback Complexity      | 🟢 Low    | All changes reversible           |

🔍 AI-Detected Concerns:

1. Auto Scaling Group Update Requires Attention
   - Launch template change triggers rolling update
   - Recommendation: Set min_elb_capacity = 2 for availability
   - Impact: Potential 2-3 minute service degradation

2. NAT Gateway Cost Alert
   - New NAT Gateway: ~$32.40/month
   - Recommendation: Consider VPC endpoints for AWS services
   - Alternative: Single NAT for non-production environments

💰 Cost Impact Analysis:
- NAT Gateway: $32.40/month
- Data Transfer: ~$50.00/month
- Secrets Manager: $0.40/month
- Total Increase: +$145.20/month

🔒 Security Recommendations:
- Enable Secrets Manager automatic rotation (30 days)
- Add CloudWatch alarms for unauthorized access
- Configure VPC Flow Logs for traffic monitoring

Sample includes: Risk assessment β€’ Cost breakdown β€’ Security analysis β€’ Deployment checklists β€’ Rollback procedures β€’ Testing recommendations

📄 View full sample: After installing the extension, check samples/reports/aws_ai_enhanced_report.md

🔵 Azure Infrastructure Sample - AI analysis for Azure deployments
🚨 AI Risk Assessment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Overall Risk Level: MEDIUM ⚠️

| Risk Category           | Level    | Details                               |
|------------------------|----------|---------------------------------------|
| Infrastructure Impact  | 🟢 Low    | New resources, no modifications       |
| Security Risk         | 🟡 Medium | NSG rules need review                 |
| Cost Impact           | 🟢 Low    | $87.60/month (within budget)          |

🔍 AI-Detected Concerns:

1. NSG Rule Too Permissive
   - SSH (port 22) open to 0.0.0.0/0 (entire internet)
   - Recommendation: Restrict to specific IP ranges or use Azure Bastion
   - Security Impact: High - Exposed to brute force attacks

2. No Backup Policy Configured
   - VM lacks Azure Backup configuration
   - Recommendation: Enable 7-day retention policy
   - Risk: Data loss in case of VM failure

💰 Monthly Costs:
- VM (Standard_B2s): $30.37
- Premium SSD: $4.81
- Public IP: $3.65
- Bandwidth: $8.70
- Total: $87.60/month

οΏ½ Optimization: Save $10/month with 1-year Reserved Instance

📄 View full sample: After installing the extension, check samples/reports/azure_ai_enhanced_report.md

🟢 Google Cloud Sample - AI insights for GCP infrastructure
🚨 AI Risk Assessment
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Overall Risk Level: MEDIUM ⚠️

| Risk Category           | Level    | Details                               |
|------------------------|----------|---------------------------------------|
| Infrastructure Impact  | 🟡 Medium | Multi-zone deployment complexity      |
| Security Risk         | 🟡 Medium | Default service accounts need review  |
| Cost Impact           | 🟡 Medium | $97.40/month for 24/7 instances      |

🔍 AI-Detected Concerns:

1. Default Service Account Usage
   - Using Compute Engine default SA (overly broad permissions)
   - Recommendation: Create least-privilege service accounts
   - Security Impact: Medium - Potential privilege escalation

2. SSH Access Open to Internet
   - Firewall allows SSH from 0.0.0.0/0
   - Recommendation: Use Identity-Aware Proxy (IAP)
   - Fix: source_ranges = ["35.235.240.0/20"] # IAP range

💰 Monthly Costs:
- 2x e2-medium instances: $48.54
- Load Balancer: $18.26
- External IPs: $14.60
- Egress (100GB): $12.00
- Total: $97.40/month

💡 Save 40% with Preemptible VMs: $58.86/month

📄 View full sample: After installing the extension, check samples/reports/gcp_ai_enhanced_report.md

🎯 AI Reports Include:

  • 🧠 Intelligent risk assessment with confidence scores
  • 💰 Detailed cost projections with optimization strategies
  • 🔒 Security vulnerability detection and fixes
  • 📋 Pre/post deployment checklists
  • 🔄 Automated rollback procedures
  • 🧪 Testing recommendations
  • ⚠️ Proactive issue detection with mitigation plans

📄 Basic Reports (Available Now - 100% Free!)

AWS Sample - 4 resources to add, 2 to change (IGW, NAT Gateway, ASG)
Azure Sample - VNets, Subnets, VMs with security groups
GCP Sample - Compute instances, VPCs, Firewalls with load balancing

✨ Features:

  • Clean, organized tables
  • Color-coded resource actions (βž• Create, 🔄 Modify, ❌ Destroy)
  • Resource attribute details
  • Export to PDF or Markdown
  • Generated in 2 seconds

📁 Access samples: After installation, all samples are in the extension's samples/reports/ directory


🛠️ Installation

Option 1: From VS Code Marketplace (Recommended)

  1. Open VS Code
  2. Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac)
  3. Search for "Terraform Report Generator"
  4. Click Install
  5. Reload VS Code

Option 2: From VSIX File

code --install-extension terraformai-0.1.3.vsix

Option 3: Manual Installation

  1. Download .vsix file from GitHub Releases
  2. In VS Code: Extensions β†’ ... menu β†’ Install from VSIX
  3. Select downloaded file

🎬 How to Use

Method 1: Context Menu (Easiest)

  1. Generate your Terraform plan file:
    terraform plan -out=plan.tfplan
    terraform show -no-color plan.tfplan > plan.txt
    
  2. Right-click on plan.txt in VS Code
  3. Select "Terraform: Generate Plan Report"
  4. Report opens automatically! ✨

Method 2: Command Palette

  1. Open your plan file in VS Code
  2. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  3. Type "Terraform: Generate Plan Report"
  4. Press Enter

Method 3: Keyboard Shortcut

  1. Open plan file
  2. Press Ctrl+Alt+T (Windows/Linux) or Cmd+Alt+T (Mac)
  3. Instant report!

📚 Available Commands

Command Description When to Use
Terraform: Generate Plan Report Auto-detect best mode Default choice - Let the extension decide
Terraform: Generate Basic Report Fast, offline mode Quick reviews, no AI needed
Terraform: Generate AI Report Enhanced analysis Complex changes, need insights

🎨 Report Features

Basic Mode (Lightning Fast ⚑)

Terraform Plan β†’ Parser β†’ Markdown β†’ PDF
                 ↓
            - Extract changes
            - List resources  
            - Show attributes
            - Color-coded actions
            
Result: Clean report in 2 seconds

βœ… Perfect for:

  • Daily routine changes
  • Simple infrastructure updates
  • Quick peer reviews
  • CI/CD pipeline documentation

AI-Enhanced Mode (Coming Soon 🚀)

Terraform Plan β†’ Parser β†’ AI Analysis β†’ Rich Report β†’ PDF
                          ↓
                    - Impact assessment
                    - Risk classification
                    - Testing recommendations
                    - Rollback procedures
                    
Result: Comprehensive analysis in 30 seconds

βœ… Perfect for:

  • Production deployments
  • Complex multi-resource changes
  • Security-critical updates
  • Stakeholder presentations

βš™οΈ Configuration

Customize the extension to fit your workflow:

{
  // Report generation mode
  "terraformReport.mode": "auto",  // "auto" | "basic" | "ai"
  
  // Default export format
  "terraformReport.defaultExport": "pdf",  // "pdf" | "markdown" | "both"
  
  // Auto-open report after generation
  "terraformReport.openAfterGenerate": true,
  
  // Report template style
  "terraformReport.templateStyle": "professional"  // "professional" | "minimal" | "detailed"
}

Configuration Options Explained

Setting Values Description
mode auto, basic, ai How to generate reports (auto detects complexity)
defaultExport pdf, markdown, both Output format preference
openAfterGenerate true, false Automatically open report when done
templateStyle professional, minimal, detailed Report styling

Access Settings

  1. File β†’ Preferences β†’ Settings (or Ctrl+,)
  2. Search for "Terraform Report"
  3. Adjust settings to your preference

💰 Pricing

🎉 100% FREE Forever!

  • βœ… Unlimited basic reports
  • βœ… PDF and Markdown export
  • βœ… All core features
  • βœ… No credit card required
  • βœ… No usage limits
  • βœ… Open source (MIT License)

No hidden costs. No subscriptions. Completely free.

🚀 Future AI Features (Optional - Coming Soon)

When we release AI-enhanced analysis:

  • 🆓 5 free AI reports included for all users
    • Each report processes your Terraform plan through AI analysis
    • Usage measured in "report credits" based on plan complexity
    • Simple plans (few resources) = 1 report credit
    • Complex plans (many resources) = may use more credits
    • No technical knowledge needed - just generate reports!
  • 💳 Additional credits available for power users
  • 🏢 Enterprise options for teams and organizations

Current version is 100% free with no limitations!

🎯 Real-World Use Cases

1️⃣ Pre-Deployment Review

# Generate plan and report before applying
terraform plan -out=plan.tfplan
terraform show -no-color plan.tfplan > plan.txt
# Generate report in VS Code
# Review β†’ Approve β†’ Apply
terraform apply plan.tfplan

2️⃣ Change Request Documentation

  • Generate report from your plan
  • Attach PDF to Jira/ServiceNow ticket
  • Stakeholders review without Terraform knowledge
  • Track approved changes for compliance

3️⃣ Team Code Reviews

  • Include report in pull request
  • Reviewers see infrastructure impact immediately
  • Faster approvals, fewer questions
  • Better collaboration

4️⃣ Production Safety Check

  • Quickly scan for destroy operations
  • Verify resource counts match expectations
  • Archive report for post-deployment audit
  • Sleep better at night! 😴

�️ Roadmap - What's Coming Next

Version 1.1 (Next Month)

  • 🤖 AI-Powered Analysis - Intelligent impact assessment and recommendations
  • 📊 Enhanced PDF Styling - More templates and customization
  • 🔍 Plan Comparison - Compare two plans side-by-side
  • 📈 Drift Detection - Highlight unexpected changes

Version 1.2 (Q1 2026)

  • 📋 Change History - Track and archive all your deployments
  • 🎨 Custom Templates - Create your own report layouts
  • 🔗 CI/CD Integration - GitHub Actions, GitLab CI, Azure DevOps
  • 📊 Dashboard View - Web-based report viewer

Version 2.0 (Q2 2026)

  • 🧠 Advanced AI Features - Risk scoring, dependency analysis
  • 👥 Team Collaboration - Share and comment on reports
  • 📱 Mobile App - Review plans on the go
  • 🔒 Enterprise Security - SSO, RBAC, audit logs

Want a feature? Request it here!

🤝 Contributing

We welcome contributions from the community! Here's how you can help:

  • 🐛 Report bugs - Found an issue? Let us know!
  • 💡 Suggest features - Have an idea? We want to hear it!
  • 📝 Improve docs - Help make our documentation better
  • 💻 Submit PRs - Code contributions are always welcome

See CONTRIBUTING.md for detailed guidelines.

🐛 Troubleshooting

Report generation fails

Solution: Ensure PowerShell is installed and accessible:

pwsh.exe --version

PDF not generated

Solution: Check that your plan file is valid Terraform output:

terraform show -no-color plan.tfplan > plan.txt

Extension not appearing

Solution: Reload VS Code after installation:

  • Press Ctrl+Shift+P
  • Type "Reload Window"
  • Press Enter

Still having issues? Open an issue with:

  • VS Code version
  • Extension version
  • Error message (if any)
  • Sample plan file (sanitized)

📜 License

MIT License - see LICENSE file for details.

TL;DR: Free to use, modify, and distribute. No restrictions!

🙏 Acknowledgments

  • 🎯 Built for DevOps Engineers who spend too much time reading Terraform output
  • 💡 Inspired by real pain - We've all been there!
  • 🌟 Powered by the community - Your feedback makes this better
  • ❀️ Open source forever - Because great tools should be free

οΏ½ Support & Community

  • 🐛 Report a Bug
  • 💡 Request a Feature
  • 💬 Discussion Forum
  • 📧 Email Support

⭐ Show Your Support

If this extension saves you time, please:

  • ⭐ Star the repo on GitHub
  • ✍️ Write a review on VS Code Marketplace
  • 🐦 Share it with your team and on social media
  • 💬 Share your feedback to help us improve

Made with ❀️ for the DevOps community

Stop squinting at terminal output. Start shipping with confidence.

Install Now | View on GitHub | Read the Blog

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
Β© 2025 Microsoft