
I built an Open-source CLI to convert existing cloud resources into Terraform/OpenTofu code using AI
Hey folks,
I'm Arunim, founding engineer at StackGuardian. I built an open-source tool called terraclaw that takes your existing cloud infrastructure and generates modular Terraform/OpenTofu HCL from it — not just a flat import, but structured code with modules, variables, dependency wiring, and import scripts.
How it works:
- Discovers resources via Steampipe (AWS + Azure)
- Interactive terminal UI to browse and select resources with dependency expansion
- You can register your own Terraform modules from git repos — it parses them via HCL and scores how well they fit your selected resources, then uses them as hard constraints during generation
- Runs import and iterates until terraform plan shows zero drift
It's written in Go, works with both Terraform and OpenTofu (just set TERRAFORM_BIN=tofu), and everything runs locally.
I'm looking for people to try it out and tell me what's broken, what's missing, or what would make it actually useful for your workflow. Issues and PRs welcome.
GitHub: https://github.com/arunim2405/terraclaw
If you find it useful, a star would really help with visibility. Thanks!
P.S: Sill in Beta, please use READ ONLY credentials.