Vibe Coding Your Infrastructure
The article discusses the challenges of using AI to manage infrastructure code, specifically with Terraform. It highlights the difficulty of making informed decisions about infrastructure settings without sufficient context from application code. The author argues that separating application and infrastructure code leads to mistakes that are hard to catch during code reviews.
- ▪AI can generate HCL code for infrastructure, but it struggles with decision-making due to lack of context.
- ▪Infrastructure decisions like IAM scopes and timeouts are critical and often made blindly by AI.
- ▪The separation of application and infrastructure code complicates reviews and increases the risk of production outages.
Opening excerpt (first ~120 words) tap to expand
On vibe coding your infrastructureWhat happens when you point AI at your Terraform, and why infra-from-code frameworks are the structural fix.After I wrote about letting the AI cook on application code, a few people came back with the same pushback. Sure, that works for the route handlers and the database queries, but what about the infrastructure? Are you handing Terraform to the model and just letting it run? I'm not, and that's the place where the whole approach breaks down for me. The model writes HCL fine, that part has never been the issue. The hard part of infrastructure work is the decisions that go into each line, like sizing and retention and IAM scopes and timeouts, and the application code gives the model almost nothing to work with on any of them.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Ivan.