Parses and visualizes Terraform configurations as interactive diagrams. Deployed on AWS EKS.
- Infrastructure: EKS, VPC, ECR, ALB deployed
- Application: Operational
- CI/CD: GitHub Actions
- Test Coverage: 97%
- Security: Trivy scanning
- Monitoring: Health checks configured
- Parses
.tffiles to extract resources, relationships, and dependencies - Interactive React-based diagram with drag-and-drop interface
- Complete CI/CD pipeline via GitHub Actions
- Multi-stage Docker builds with production optimization
- Helm chart for Kubernetes deployment
- Horizontal Pod Autoscaler for production scaling
- Health monitoring and smoke tests
- Automated security scanning with Trivy
GitHub → GitHub Actions → AWS ECR
↓
AWS EKS → ALB → Users
↓
TF Visualizer App
(Flask + React)
- AWS Account with appropriate permissions
- Terraform >= 1.5.0
- kubectl >= 1.28
- Helm >= 3.0
- AWS CLI v2
- Python 3.11+ (development)
- Node.js 18+ (frontend)
git clone https://github.com/jeremykuhnash/nova-infra.git
cd nova-infra
./setup.sh # Installs AWS CLI, Terraform, GitHub CLI, kubectlaws configure # Enter: Access Key, Secret Key, Region (us-east-1), Output (json)
aws sts get-caller-identity # Verifycd terraform
./init-backend.sh # Creates S3 bucket and DynamoDB tableterraform plan -out=tfplan
terraform apply tfplan # Takes 15-20 minutes
export ECR_URL=$(terraform output -raw ecr_repository_url)
export EKS_CLUSTER=$(terraform output -raw eks_cluster_name)aws eks update-kubeconfig --region us-east-1 --name $EKS_CLUSTER
kubectl get nodes # Verify 3 nodes are Ready
kubectl config current-context # Verify context# Push to main triggers automatic deployment
git push origin main
# Or trigger manually
gh workflow run build-deploy.yml
gh run watch # Monitor deploymentcd ../apps/hello-world
docker build -t tf-visualizer .
aws ecr get-login-password --region us-east-1 | \
docker login --username AWS --password-stdin $ECR_URL
docker tag tf-visualizer:latest $ECR_URL:latest
docker push $ECR_URL:latest
helm install tf-visualizer ./helm/tf-visualizer \
--set image.repository=$ECR_URL \
--set image.tag=latestLB_URL=$(kubectl get service tf-visualizer -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
curl http://$LB_URL/health
echo "Application URL: http://$LB_URL"helm uninstall tf-visualizer
cd terraform
terraform destroy -auto-approve| Workflow | Trigger | Purpose |
|----------|---------|---------||
| build-deploy.yml | Push to main/develop | Test, build, deploy |
| terraform.yml | Push to main, manual | Infrastructure management |
| ecr-push.yml | Push to main/develop | Docker image management |
| terraform-validate.yml | PR to main | Terraform validation |
# Required: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
./scripts/setup-github-secrets.sh # Reads from ~/.aws/credentialsgh workflow run terraform.yml -f action=apply # Infrastructure
gh workflow run build-deploy.yml # Application
gh run watch # Monitor- Test Coverage: 97% minimum
- Security: Trivy scanning
- Validation: Terraform on PRs
- Testing: Smoke tests post-deploy
- Type Checking: mypy
- Linting: ESLint, ruff
- Extracts resources, modules, variables from .tf files
- Supports nested modules and dependencies
- JSON output for visualization
- React frontend with drag-and-drop
- Color-coded resources by type
- Dependency arrows
- Zoom/pan controls
GET /health- Health checkGET /api/entities- Cached entitiesPOST /api/parse- Parse .tf filesPOST /api/parse-directory- Parse directoryGET /api/sample- Demo dataGET /api/scan-paths- Available directories
# terraform/terraform.tfvars
project_name = "tf-visualizer"
environment = "dev"
aws_region = "us-east-1"
eks_cluster_version = "1.28"
node_group_instance_types = ["t3.medium"]# helm/tf-visualizer/values.yaml
replicaCount: 2
image:
repository: YOUR_ECR_URL
tag: latest
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10cd apps/hello-world
make test # pytest with coverage (97%)cd apps/hello-world
python backend/parser.py ./test-terraform# Backend
cd apps/hello-world
make dev
# Frontend
cd apps/hello-world/frontend
npm install && npm start
# Docker Compose
docker-compose -f docker-compose.local.yml upcd apps/hello-world
make lint # Linters
make format # Auto-format
make security # Security scan
make all # Full validationnova-infra/
├── .github/workflows/ # CI/CD pipelines
├── terraform/ # Infrastructure as Code
│ ├── modules/ # EKS, networking, ECR
│ ├── bootstrap/ # Backend state setup
│ └── init-backend.sh # Initialize backend
├── apps/hello-world/ # Application
│ ├── backend/ # Flask API + parser
│ ├── frontend/ # React UI
│ ├── tests/ # Test suite (97%)
│ └── Dockerfile # Multi-stage build
├── helm/tf-visualizer/ # K8s manifests
├── scripts/ # Automation
└── setup.sh # Environment setup
- IRSA for pod authentication
- Network policies
- Security groups
- Trivy scanning
- Non-root containers
- CloudWatch insights
- Metrics server
- HPA auto-scaling
- Health probes
helm uninstall tf-visualizer
cd terraform
terraform destroy -auto-approve| Service | Hourly | Monthly |
|---|---|---|
| EKS Cluster | $0.10 | $73 |
| EC2 Nodes (3x t3.medium) | $0.13 | $92 |
| ALB | $0.03 | $18 |
| NAT Gateways (2x) | $0.09 | $66 |
| Total | $0.35 | $249 |
Costs vary by region
cd terraform/environments/prod
terraform apply# helm/tf-visualizer/values.yaml
ingress:
enabled: true
hosts:
- host: tf-viz.example.compostgresql:
enabled: true
auth:
database: tfviz- Fork repo
- Create feature branch
- Submit PR
MIT