I'm considering my options for Infrastructure as Code and was initially set on using Terraform with HCL. However, I've been running into challenges with how HCL handles module definitions and type definitions. It feels like I'm constantly rewriting the API for resources, which leads to a lot of maintenance work as the resources change. This has put me in a position where I feel a programming language approach might be better suited for what I need. I've heard that CDKTF has limited support, so I'm leaning towards Pulumi instead. What do you think? Should I make the switch? I'm a developer, and I find there's a different mindset in infrastructure roles compared to dev work, which often complicates things. Am I alone in this?
5 Answers
You're venting, and I get it. But really, needing a programming language for Terraform usually comes from needing to manage huge infrastructure. For smaller setups, it sounds like you're overcomplicating things with all these abstractions. Sometimes simpler is better, and you might be over-engineering your solution.
I hate HCL too! I've been planning a shift to Pulumi after having a good experience with it in my last job. I used JavaScript then, but this time I'm switching to Python. For personal projects, Pulumi is way more flexible. Just keep in mind, if you're sharing your work, Terraform could be more suitable.
If this is for a personal project, go with Pulumi. You can use the language you're most comfortable with. But if it's a professional setting where someone else will manage the code, Terraform or OpenTofu might be better. If done right, Terraform should minimize repetitive code.
Changing tools just because one doesn't have a feature you want isn't always the best move. Have you discussed potential long-term implications with your team? Consider tech debt and possible hiring hurdles with anything outside of Terraform. It's a balance between maintenance ease and team capability.
I've tried different tools including CDK and Terraform, and I honestly think Terraform is the smoothest for infrastructure. Using imperative languages can add extra boilerplate—why not just stick to Terraform where you can simply instantiate resources?
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String