Inspiration
When teams run terraform plan, it outputs hundreds of lines of diffs — hard to review manually. Reviewers struggle to see what's changing, what's risky, and what policy violations might occur. We needed an intelligent solution that could parse complex Terraform plans and provide clear, actionable insights to help teams make better infrastructure decisions quickly and confidently.
What it does
TerraReviewBot is an AI-powered web application that transforms complex Terraform plan outputs into clear, actionable insights. It:
- Validates Terraform Plans: Supports both JSON and text format plan files with automatic format detection
- AI-Powered Analysis: Uses NVIDIA's Llama 3.1 Nemotron model to provide intelligent plan reviews
- Security Assessment: Identifies potential security risks and policy violations in infrastructure changes
- Resource Visualization: Displays clean tables of resource changes, filtering out no-op actions
- Cost Impact Analysis: Provides insights into potential cost implications of planned changes
- Actionable Recommendations: Offers next steps and best practices for infrastructure deployment
How we built it
We built TerraReviewBot using modern web technologies and AI integration:
- Backend: Python Flask framework for robust web application structure
- AI Integration: NVIDIA's Llama 3.1 Nemotron model via OpenAI-compatible API
- File Processing: Smart validation logic for both JSON and text Terraform plan formats
- User Experience: Drag-and-drop file uploads, real-time validation, and clean result presentation
Challenges we ran into
- Multi-format Support: Handling both binary Terraform plans (converted to JSON) and text outputs required different parsing strategies
- AI Response Formatting: Getting consistent, clean formatting from the AI model without stray markdown symbols took multiple prompt iterations
- Session Management: Implementing secure API key storage without server-side persistence while maintaining user convenience
- File Validation: Ensuring robust validation for different Terraform plan structures and formats UI/UX Design: Creating an intuitive interface that handles complex technical data in a user-friendly way
Accomplishments that we're proud of
- Seamless AI Integration: Successfully integrated NVIDIA's cutting-edge Llama model for intelligent infrastructure analysis
- Smart Filtering: Automatically filters out no-op actions to focus on meaningful infrastructure changes
- Real-world Ready: Built a production-ready application that can handle actual Terraform workflows
What we learned
- AI Prompt Engineering: Crafting effective prompts for consistent, structured AI responses requires iterative refinement
- Terraform Plan Complexity - Terraform plans contain nuanced information that requires careful parsing and intelligent interpretation. Supporting reading from binary file would be next big improvement.
What's next for TerraReviewBot
CI/CD Integration & Extensions:
- Bitbucket Pipelines: Native pipe integration for automated plan analysis in Bitbucket workflows
- GoCD Extension: Plugin for GoCD pipelines to integrate Terraform plan reviews in deployment stages
- Azure DevOps Extension: Marketplace extension for Azure Pipelines with pull request integration
- GitHub Actions: Action for automated PR comments with AI analysis results
- GitLab CI Integration: Custom component for GitLab pipelines
API & Platform Expansion:
- REST API: Comprehensive API endpoints for programmatic access and custom integrations
- Policy Engine: Custom policy rules and compliance checking against organizational standards
- Deployment gate and Automated PR approval for low risk plans. eg- A plan which just create resource and cost impact is less than $100/month should get auto approved.
Log in or sign up for Devpost to join the conversation.