Re:Terraform Scripting Concepts
by 0x445442 on Monday January 03, 2022 @08:41AM
(#29780666)
No you’re not the only one. The problem with Terraform “Scripting” is in a lot of cases it takes a loooong time to find out your “runtime” errors. These are typically fat fingered strings. I think something like AWS CDK, where you find these errors at compile, time is a better approach.
[ Parent
| on HN ]
Re:Terraform Scripting Concepts
by w1nt3rmut3 on Monday January 03, 2022 @08:58AM
(#29780795)
This already exists. https://github.com/hashicorp/terraform-cdk/
I wasn't aware of this and I'm glad to see they're doing it. But my guess is this is a relatively recent offering in response to the AWS version and the issues I was mentioning.
Re:Terraform Scripting Concepts
by seniorThrowaway on Monday January 03, 2022 @02:13PM
(#29784959)
terraform really needs to be run in CI/CD pipe. Even without the backend initialized you can run terraform validate which will find things like undeclared variables and messed up count and foreach references.
Re:Terraform Scripting Concepts
by isbvhodnvemrwvn on Monday January 03, 2022 @03:45PM
(#29786602)
But it won't find resource IDs being passed instead of ARNs, and a whole lot of other things.