Live data from Hacker News

“Who Should Write the Terraform?”

zwischenzugs.com

41–50 of 137 posts

Re: “Who Should Write the Terraform?”

#41
> The development team didn’t want to – or couldn’t – do the Ops work

Most devs I've spoke to are in this camp they don't want to do any Ops work at all. They want a 9-5 job without evenings are weekends wasted by services failing. No on call rota and all that jazz just writing code that's all.

Re: “Who Should Write the Terraform?”

#42
If you're at a company that doesn't have a Platform team, but that still struggles with wanting centralized guardrails and best practices, and a consistent set of patterns across services and teams, the answer to this question might be a developer experience platform like what we're building at Coherence (I'm a cofounder). In this case, someone else writes the terraform, and you just tell us how to map it onto your code. This lets us give you nice things like a dashboard to manage deployments, cloud IDEs, branch preview environments, etc. while still giving your dev/devops folks total control and visibility, since it runs in your own cloud...

Would love anyone interested to give it a spin at withcoherence.com and please feel free to ping hn@withcoherence.com with any feedback or issues!

Re: “Who Should Write the Terraform?”

#43
post #32

Software Engineer at Spacelift[0] here - a CI/CD specialized for Infra as Code (including Terraform). A pattern we're seeing increasingly commonly are Platform Engineering teams doing the bulk of the work, including all the fundamentals, guidelines, safety railing, and conventions, while Software Engineers only use those, or write their own simple service-specific Terraform Stacks which however extensively use module…

I think this would easier to adopt if it could be plopped into an existing agnostic CI system. We built something like this in-house on top of Gitlab CI and it works really well for us. Locking isn't as much of an issue as you make it seem in the pitch, we just have our infra contaiers wait to acquire and renew a distributed lease while they're running. Some kinds of failures just release the lock and others panic an…

The semantics of standard CI/CD providers are in practice very ill-suited to more advanced Infrastructure-as-Code use cases (triggering other stacks based on changes, multi-repo workflows, etc.), so building on top of them would add a lot of complexity. I don't want to go too much into it.

Overall, if your setup works for you and you're happy with it - keep using it!

We've seen a lot of companies (many now our customers :) ) try to build their own on top of existing systems (GitHub, Gitlab, Jenkins, etc.) and waste a ton of time and engineering resources, while ultimately not achieving anything that works well.

What Spacelift does is it gives you a bunch of much better-suited building blocks which let you build your required workflow very quickly.

And it obviously does integrate very deeply with your VCS provider - Commits, Pull Requests, Comments, etc. - everything is supported and customizable using - amongst others - Push Policies[0].

[0]: https://docs.spacelift.io/concepts/policy/git-push-policy

Re: “Who Should Write the Terraform?”

#44
post #28
post #7

What a long winded article to say "it depends", I liked the history though. It got me thinking, here at amazon, we deliver "infrastructure as code" using the Cloud Development Kit: https://aws.amazon.com/cdk/ We expect engineers (not devops) to define their infrastructure in typescript and configure it through code. That code gets turned into cloudformation scripts and stands up the how cloud system for the api you'r…

As a SWE, I don't think it's great. I'm more interested in writing product features and fixing bugs. I'm not that interested in writing CDK stacks to create databases or what not.

If your features don't involve utilizing stuff like S3, SNS, SQS, Lambda, DynamoDB, CloudWatch Metrics / Alarms, you're probably missing out on a lot of value. Nobody wants to spend time "writing CDK stacks to create databases or what not," but implementing tough features without these services can easily involve exponentially more work / maintenance / expertise.

Re: “Who Should Write the Terraform?”

#46

Software Engineer at Spacelift[0] here - a CI/CD specialized for Infra as Code (including Terraform). A pattern we're seeing increasingly commonly are Platform Engineering teams doing the bulk of the work, including all the fundamentals, guidelines, safety railing, and conventions, while Software Engineers only use those, or write their own simple service-specific Terraform Stacks which however extensively use module…

I think a platform team taking ownership is the correct model, but the early product teams need to have "embeds".

The platform team owning base terraform functionality works well for the product teams that are the 3rd or 4th user of said functionality.

For the early days of the platform, and the early users.. your product is constantly in dependency & priority battles with said platform team. This is where "embeds" help continually unblock while making sure the work is done in a platform centric manner that will be reusable for other product teams.

Simply saying the product teams need to go down into the weeds at this level just puts too much disparate responsibility on product teams who exist to deliver a single product. Similarly it encourages vastly different approaches to similar problems, with all the wasted duplicate & re-work.

Re: “Who Should Write the Terraform?”

#47
post #9
post #2

There is good stuff in this article, though I wish more writers would hire editors to help trim these articles (I always hire an editor when I write something this long). I think this is the heart of it, though you have to go pretty far into the article to get to this bit: "What’s the point of this long historical digression? Well, it’s to explain that, with a few exceptions, the division between Dev and Ops, and bet…

> and between centralisation and distribution of responsibility has never been resolved. Its never been resolved because people try to have their cakes and eat it too. There's pros and cons to both ways, but people refuse to deal with the cons. Dealing with that in my current org, where a decision was made to distribute a specific subset of responsibilities, and as soon as it gets even a little difficult, they start…

I couldn't agree more. As a recovering BOFH currently working on something like what the author describes as a platform team... the amount of times I've had developers bemoan the sentinel and other guardrails in place while unwilling to accept responsibility to meet the requirements of the various regulators and stakeholders is very discouraging.

"plus ça change, plus c'est la même chose"

Re: “Who Should Write the Terraform?”

#48

Software Engineer at Spacelift[0] here - a CI/CD specialized for Infra as Code (including Terraform). A pattern we're seeing increasingly commonly are Platform Engineering teams doing the bulk of the work, including all the fundamentals, guidelines, safety railing, and conventions, while Software Engineers only use those, or write their own simple service-specific Terraform Stacks which however extensively use module…

Author here: yup

Pendulum back to the center

Re: “Who Should Write the Terraform?”

#49

Earlier quoted context omitted.

Terraform really takes Conway's Law and manifests it in the real world, but I don't think terraform itself is an overengineered mess. It's quite simple when you boil it down. However, if your team structure and communication is bad, you're probably going to get bad terraform code. I've seen both, large teams writing extremely well-written terraform, and small teams writing a mess of spaghetti. Like anything in softwa…

Quite simple for simple tasks. Automation is not always simple though. That is like asking someone to write a program that is static and only has inputs and outputs, but doesn't do loops well or anything else. Terraform is great if you are fine with duplicating things in 100 different places. Once you want to take values and plug them into various modules and run loops, then Terraform begins to suck and its weaknesse…

So duplication is not inherently bad if each team has slightly different requirements and is expected to own its infrastructure. Or in other words, the overhead of communication can easily be higher than the overhead of duplication.

Re: “Who Should Write the Terraform?”

#50

At my company, I do. As a backend engineer. Guided by the devops team. It is a nightmare of arcane copy pasting. Terraform is an overengineered mess, a complex enemy I need to beat to deploy my simple changes.

Compared to CDK? its less verbose. The problem with Infrastructure as Code is that its not code at all. It's just describing the infrastructure that with typical web console manipulation is easy but becomes complicated when you try to describe every moving pieces.
Post reply on HN