Skip to main content

Mike Kreuzer

January countdown - 8

19 January 2024

On with the January project. This time it's infrastructure as code. Again. More.

8. I used Terraform for years, but I never enjoyed it much. Over time most of the infrastructure I was using was hosted on AWS, so I ended up moving over to the AWS CDK. Adding Cloudflare & Hetzner into that mix meant I couldn't stick to the CDK though. Not if I wanted to use the one tool across all three companies. Terraform would still work, but I was leery of going back to HCL, and to the unstable license world of HashiCorp, so I tried Pulumi. Python support being the main attraction. Alleged Python support.

Nobody talked about Pulumi much. A case of nothing nice to say I suspect now.

There were a lot of borderline and straight up dark patterns with Pulumi right out of the gate with their attempts at channeling users into their cloud offering. That was a giant red flag for me. I could work around it but it got harder right away. New & init wouldn't work without a cloud login. I could make projects manually, but Pulumi's Python version played really badly with Poetry, module imports weren't noticed in PyCharm, & Poetry needed to pretend not to have a virtual environment to work at all. Maybe some of the other allegedly supported languages work better, I didn't try. Generally there are a lot of rough edges with Pulumi. Too many for me. It felt like not many people were using it, & anecdotally that's true for all the people I did get to talk about it. A whole Red Square worth of red flags.

Oh well, I tried. Dropping Pulumi meant I could finally upgrade from Python 3.11 to 3.12. (Pulumi doesn't work with the latest version of Python, because why would it.) Win, win.

I did get to try the "AI" tool offered on the Pulumi site for a laugh too, & it didn't disappoint, the answers it provided were hilariously wrong. Oh you want to do that? Tried adding these arguments? They don't exist, this whole function's something I just made up so this won't work, but if it did exist… was that useful? That's the "AI" tool in most places, but with Pulumi it was almost the only resource I could find.

Open Tofu released its first stable version just as I was uninstalling Pulumi. The same annoying (renamed) HCL, but with an open source license & the Linux Foundation instead of HashiCorp. I decided to give it a shot instead. My thinking being that if it fails I can still always migrate back to Terraform. So I'm no worse off.

More about just why I might want to add Cloudflare & Hetzner infrastructure in a future post in this countdown.