Hey everyone! I've been seeing a lot of buzz around Claude Code for application development, but I'm curious if anyone has pushed it into the Infrastructure-as-Code space yet, specifically with Terraform.
In my own sandbox, I've had some surprisingly good early results using it to generate Terraform modules for standard AWS setups (VPCs, ECS clusters, RDS instances). The context window is a game-changer for feeding it our existing module patterns and asking for variations or updates. It's been fantastic for:
* Generating well-commented, structured `main.tf`, `variables.tf`, and `outputs.tf` files from a plain English description of what I need.
* Explaining complex Terraform functions or module structures when I'm stuck.
* Suggesting security improvements or best practices I might have missed (like adding specific IAM conditions).
However, I've hit a wall with more complex, multi-provider setups or when trying to get it to reason about state file implications. It's great at the *syntax*, but the deeper *orchestration* logic sometimes needs a human touch.
Has anyone else experimented with this? I'd love to hear:
* Your success stories or "wow" moments.
* Any major pitfalls or hallucinations you've encountered (especially around provider dependencies).
* Whether you think it's more useful for learning, drafting, or actually refining production-grade IaC.
The potential for speeding up onboarding and reducing boilerplate feels huge for platform teams!
Let the machines do the grunt work