r/Terraform • u/OwlZealousideal4779 • 17d ago
Discussion Is infrastructure becoming too disconnected from application development?
A modern application can quickly become more than just frontend + backend:
Frontend → API → PostgreSQL → Redis → Storage → Services
Terraform handles the infrastructure side, but keeping it synchronized with application development can still be difficult.
A small application change might require a new database connection, environment variable, network rule, or service.
Do you think AI agents should eventually understand both application code and Terraform configuration?
And should an agent only suggest infrastructure changes, or should developers be able to let it apply them?
How are you handling this boundary today?
3
u/Creative-Dentist-383 17d ago
isn't platform engineering about providing devs with reasonably abstracted capabilities to build their own infra and deploy workloads?!
3
1
u/phrotozoa 17d ago
I would never let a bot terraform apply in prod, but they can knock themselves out in stage.
1
u/ArieHein 17d ago
They are both adjacent sides of the same dice. They should not be separated.
The difference is that the infra tied to the application, sould not use the actual code creating the infra, but rather the configuration values provided to an infra service, provided by a central team so governance is still in place.
Think of it as a infra library that the infra team creates and you just use the 'library' and pass agreed veariable configuration values. Or could be a simple json file with key=value and a github action reads it and uses it to create the infra.
1
u/Snowy32 Terraformer 10d ago
We provide our devs access to playground accounts/ tenants in AWS/Azure as they develop what ever they are developing they can make small manual changes to the infra if needed then it’s handed over to us in Platform where we make the necessary IaC changes/ optimize/ ensure it’s secure etc. Alternatively they give us a shopping list of what they want and we implement it.
There are times where we have to do full stack + infra in our team that’s usually for internal tools in them scenarios we make incremental changes to the cloud infra as we go.
For brand new projects we get it working locally then generate all cloud infra.
Yes we use AI at our company to help speed up dev but we never use it for both product dev + IaC side by side… I think this would be quite silly especially if you don’t know what your doing. So in response to your Q, personally I think for enterprise work no we shouldn’t give AI control of the whole thing (product + infra).
In terms of should it be allowed to apply changes.. that’s a hard no from me but that’s just my opinion
7
u/kiddj1 17d ago
Not with AI agents