AI-Powered Infrastructure Automation - Create AWS infrastructure using natural language!
✨ 100% Free - No Paid APIs Required! ✨
Mini InfraGPT automates AWS infrastructure deployment using natural language processing. Just describe what you need in plain English, and the system automatically:
- 🧠 Parses your infrastructure requirements intelligently
- 📝 Generates Terraform code dynamically
- ☁️ Deploys complete AWS infrastructure
- 🐳 Containerizes and deploys your application
- 📊 Monitors system health with built-in endpoints
$ python main.py "I need a web server with PostgreSQL database"
🧠 Analyzing request...
✅ Specifications parsed
📝 Generating Terraform...
✅ Infrastructure ready to deploy!
$ cd generated-terraform && terraform apply
⏱️ Deploying to AWS...
✅ Your infrastructure is live!
🌐 http://YOUR-IP| Feature | Description |
|---|---|
| 🆓 100% Free | No paid API keys required - uses rule-based parsing |
| 🏗️ Infrastructure as Code | Auto-generates production-ready Terraform |
| ☁️ AWS Integration | Full deployment automation for EC2, VPC, RDS |
| 🐍 Python-Powered | Clean, modular, well-documented codebase |
| 🔄 CI/CD Ready | GitHub Actions workflow included |
| 📊 Monitoring | Built-in health checks and status endpoints |
- Python 3.11+
- Terraform 1.0+
- AWS CLI (configured)
- AWS Account (Free Tier)
# 1. Clone repository
git clone https://github.com/YOUR_USERNAME/mini-infra-gpt.git
cd mini-infra-gpt
# 2. Setup environment
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# 3. Configure AWS
aws configure
# Enter your AWS credentials# 1. Generate infrastructure code
python main.py "I need a simple web server"
# 2. Deploy to AWS
cd generated-terraform
terraform init
terraform plan
terraform apply # Type 'yes' to confirm
# 3. Get your server IP
terraform output instance_public_ip
# 4. Deploy web application
cd ..
./deploy-app.shhttp://YOUR_PUBLIC_IP
mini-infra-gpt/
├── src/
│ ├── ai_parser.py # Natural language processing
│ ├── terraform_generator.py # Dynamic IaC generation
│ └── aws_deployer.py # AWS automation
├── docker/
│ ├── Dockerfile # Container definition
│ └── app.py # Flask application
├── scripts/
│ ├── setup.sh # Environment setup
│ ├── deploy.sh # AWS deployment
│ └── cleanup.sh # Resource cleanup
├── tests/
│ └── test_parser.py # Unit tests
├── app.py # Web application
├── deploy-app.sh # App deployment script
├── main.py # Main entry point
└── requirements.txt # Python dependencies
┌─────────────────────────────────────────────────────────┐
│ USER INPUT │
│ "I need a web server with database" │
└────────────────────┬────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ INFRASTRUCTURE PARSER │
│ Analyzes request → Extracts specs │
└────────────────────┬────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ TERRAFORM CODE GENERATOR │
│ Creates VPC, Subnets, Security Groups │
│ EC2 Instances, RDS Databases │
└────────────────────┬────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ AWS DEPLOYMENT │
│ terraform apply → Infrastructure provisioned │
└─────────────────────────────────────────────────────────┘
-
AI Parser (
src/ai_parser.py)- Parses natural language requests
- Extracts infrastructure specifications
- Fallback to rule-based parsing
-
Terraform Generator (
src/terraform_generator.py)- Dynamically creates Terraform configurations
- Supports EC2, VPC, RDS, Security Groups
- Modular and extensible
-
Flask Application (
app.py)- Lightweight web server
- Health check endpoints
- Beautiful responsive UI
python main.py "I need a simple web server"python main.py "Create an API server with PostgreSQL"python main.py "Web application with MySQL database"# Run unit tests
pytest tests/ -v
# Test individual components
python src/ai_parser.py
python src/terraform_generator.py- ✅ Never commit AWS credentials or SSH keys
- ✅ Use
.gitignoreto exclude sensitive files - ✅ Rotate credentials regularly
- ✅ Use IAM roles with least privilege
- ✅ Enable MFA on AWS accounts
- ✅ Review security groups before deployment
- EC2: 750 hours/month of t3.micro (12 months)
- RDS: 750 hours/month of db.t3.micro (12 months)
- Storage: 30GB EBS, 5GB S3
- Data Transfer: 15GB outbound
Always destroy resources when not in use:
cd generated-terraform
terraform destroy # Type 'yes' to confirmEstimated monthly cost if exceeding free tier: $15-25
"AWS credentials not configured"
aws configure"Terraform not found"
# Ubuntu/WSL
sudo apt install terraform
# macOS
brew install terraform"Permission denied" on scripts
chmod +x scripts/*.sh
chmod +x deploy-app.sh"Instance type not available"
- Edit
generated-terraform/main.tf - Change
instance_typetot2.microort3.micro
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for details.
This project is licensed under the MIT License - see LICENSE file.
- Terraform - Infrastructure as Code
- AWS - Cloud Infrastructure
- Flask - Web Framework
- Python - Programming Language
Your Name
- Email: yashtembhare2025@gmail.com
- LinkedIn: https://www.linkedin.com/in/yash-tembhare/https://www.linkedin.com/in/yash-tembhare/
- GitHub: @yourusername
Project Link: https://github.com/yourusername/mini-infra-gpt
⭐ Star this repository if you found it helpful!
Built with ❤️ by - Yash Tembhare for DevOps Learning