Solution Architects & SysAdmins: Time to up your game, IaC is a low hanging fruit with AI
Traditionally, IaCs like Terraform is more of a Site Reliability Engineer (SRE)’s job, because it dealt with automation. There is generally a bit of learning curve and effort needed learn a new language and write good infra code. To learn new things while adulting…not the easiest thing to do.
When I learnt Terraform a while back, I took like weeks to understand the concepts and then get the associate certification from Hashicorp. When I then decided to apply it to my own infrastructure, which back then was a AWS Elastic Beanstalk application, it took me somewhat another 3 weeks on and off to read the docs and figure things out with trial and error.
Fast forward to now, the era of generative AI. I was thinking of doing up a IaC tutorial for a Medium article, as promised in my previous posts (ECS architecture with CI/CD). But I was a bit lazy, so I decided to just use AI and see how far it can take me. For ease of reference, here are the architecture I’m tring to formalize.


Oh boy, I was amazed. I always kinda had a intinctive feel that LLM would do very well for declarative type of languages, since it does not require much logic, but I didn’t expect it to do this well.
I basically created a word document that detailed what I needed step by step, which I believe is perfectly in scope for what a solutions architect or sys-admin would do. I used Windsurf (not affliated, but I’m happily paying my early bird price) and chose the latest Claude 3.7 (non thinking) model just to test things out. And just like that, BAM! Within 5 minutes, it gave me some nicely written terraform, with perfect folder structures for modularization. Honestly, I think it was cleaner than what I could ever write. There were little bits of errors, which I could just continue prompting, and it resolved within 4 prompts. Although to be fair, they are just variable referencing kind of errors most likely due to context, which I could most definitely solve it myself within minutes, but I was lazy…
Within half an hour, I got myself a fully working Terraform set up! This is AMAZING, it basically cut my work from weeks to within an hour! You can check out the full Terraform code here. It was dead simple and butter smooth, all written by AI.
The difficulty in IaC and most automation is really just syntax. Things like Terraform is easy to read, but difficult to write. Reason being, you have to study the providers documentation and figure out all the namings. This is quite time consuming but it also happens to be what AI (LLM) excels. It takes in documentation and helps you figure out where to park your variables and make things connected. You do the thinking (coming up with the architecture, writing things down step by step etc), the AI does the execution. It’s the perfect combination where errors are controlled and you reap productivity gains.
There is no reason to wait and not use AI. It’s such a low hanging fruit to up your game. Just put AI into your toolbox like how handymans would put a new hammer into theirs. Exiting times!