3 ms·
This was an interesting article. As someone who's used Terraform for, gosh, at least seven years now (!!!) and has also dabbled with Pulumi, I agree with the c
by nunez 3y ago
This was an interesting article.
As someone who's used Terraform for, gosh, at least seven years now (!!!) and has also dabbled with Pulumi, I agree with the complaints (especially regarding Hashi's licensing decision and their cloud offering) but disagree that open-source Terraform doesn't scale and that Pulumi is a better alternative.
A bulk of the authors argument lies in the following:
- Built-in testing deficiencies (I.e. Terragrunt providing some semblance of component testing that Terraform doesn't offer, and terraform plan/validate not guaranteeing passing tests post apply)
- Poor modularity leading to high DRY, and
- HCL not being a Real Programming Language™
These aren't new grievances. I think I've seen the "HCL is BS" take pretty much since I've started using Terraform, for example.
Ultimately, the issue is that Terraform is only meant to be good at creating resources in an unpredictable environment (a cloud provider) that you can't control. At all.
You can tell Terraform to apply against localstack (a mock instance of AWS you can run on your Mac), but AWS changes their APIs _constantly_ and error boundaries are essentially infinitely large. If you're serious about testing your infrastructure code, even considering the most common set of error states will lead to a significant number of (very slow!) tests.
You can easily apply the wrong state to an incorrect environment and "destroy your company" (great argument for a strong automated backup/restore workflow and ephemeral infrastructure, btw), but is it Terraform's job to prevent foot-gunning yourself in this way? I'd say no.
Regardless, I've seen some very large companies with definitely webscale levels of infrastructure enjoy lots of success managing all of that with Terraform open-source just fine. To that end, I'd say Terraform scales just fine.
In fact, I'd say Pulumi scales less well than Terraform does, in the average case.
I can teach a sysadmin with 20yrs of experience that was told to "do the DevOps now" HCL very quickly. If I, instead, said "okay, so we're going to manage our infrastructure with Pulumi and Python, and to do that, we'll need venv, pytest, pip, etc," they'll just straight up retire.
And that's before you get the 20-line long stack trace (with a bunch of frames that are within Pulumi's context) that basically vomits whatever bullshit Azure came up with this time at me.
Or trying to use Pulumi with something other than Python, Node or Golang. (Most enterprise devs write Java and C# and many of them have extensive build/release tooling custom-fit for these languages.)