Current large language models (LLMs) can generate syntactically correct Terraform HCL code, but can they generate deployable, functional Terraform stacks? Anyone who has tried will quickly notice a pattern.
Let’s take a simple example: a small application with an Amazon S3 bucket and a Lambda function.
Iteration 1: AI Generates the Basics
For the prompt “Generate Terraform to create an AWS S3 bucket and a Lambda function that processes uploaded objects,” our AI’s response was:
At first glance, the Terraform looks correct and has…