Live data from Hacker News

Infrastructure as Code Should Feel

scalefactory.com

1–10 of 52 posts

Re: Infrastructure as Code Should Feel

#3
I am an IaC advocate. I see articles like this as a barrier to meaningful IaC adoption.

> In the tech industry, we can be guilty of the same crime sometimes. Certain practices get ingrained into the profession to the point where we forget exactly why we did it in the first place.

But in school he hadn't known why he did it in the first plave.

And more often in tech I see cargo cult practices that people don't understand but follow some steps that may or may not "work." Often these are misunderstood "best practices."

He goes on to say:

> Infrastructure as Code (IaC) is a practice I really feel should be implemented everywhere it is relevant. It is good common practice, the popularity of which continues to grow.

Which is exactly how cargo cult practices spread. What do they do? How do the do it? I dunno but everyone seems to be doing something and I think it must be like FOO.

It's also incredibly dangerous to say we should follow a practice because of how it "feels." Does it "feel stable" or "feel understandable" or "feel fast?" Who cares. Show me the value, don't try to give me the tingles!

Re: Infrastructure as Code Should Feel

#4
post #3

I am an IaC advocate. I see articles like this as a barrier to meaningful IaC adoption. > In the tech industry, we can be guilty of the same crime sometimes. Certain practices get ingrained into the profession to the point where we forget exactly why we did it in the first place. But in school he hadn't known why he did it in the first plave. And more often in tech I see cargo cult practices that people don't underst…

To be fair, the author does provide arguments for why Infrastructure as Code should be used, in the next few paragraphs.

Re: Infrastructure as Code Should Feel

#5
The "safe" section is directed primarily at the development environment but once you start collaborating with something like Terraform, there are a whole bunch of ways you can forget to plan or apply a change (for example applying in a PR but forgetting to merge or closing it because you don't want to go forward with the change but forgot you applied it or a part of it). Shameless plug but my co-founder and I started Terrateam to try to make it really easy to get going with Terraform on GitHub and stay safe doing it. https://www.terrateam.io/blog/posts/safety-first/

Re: Infrastructure as Code Should Feel

#6

The "safe" section is directed primarily at the development environment but once you start collaborating with something like Terraform, there are a whole bunch of ways you can forget to plan or apply a change (for example applying in a PR but forgetting to merge or closing it because you don't want to go forward with the change but forgot you applied it or a part of it). Shameless plug but my co-founder and I started…

You shouldn't be able to apply in an MR tho, unless is some playground account. Developers shouldn't have enough permissions to modify production infra from a MR.

Re: Infrastructure as Code Should Feel

#7

The "safe" section is directed primarily at the development environment but once you start collaborating with something like Terraform, there are a whole bunch of ways you can forget to plan or apply a change (for example applying in a PR but forgetting to merge or closing it because you don't want to go forward with the change but forgot you applied it or a part of it). Shameless plug but my co-founder and I started…

You shouldn't be able to apply in an MR tho, unless is some playground account. Developers shouldn't have enough permissions to modify production infra from a MR.

Organizations have different rules around when to apply a change. Some prefer to do it pre-merge, that way if something goes wrong they can modify it and apply again, and others prefer to do it post-merge. We are not opinionated own when a customer does it, we just have rules to make sure a change is both merged and applied. Additionally, who can perform an apply is a different, but related, question to when.

The bet behind Terrateam is that a lot of developers and SREs don't want to leave their MR page when applying and planning so we are supporting as much functionality as possible there.

Re: Infrastructure as Code Should Feel

#8
post #3

I am an IaC advocate. I see articles like this as a barrier to meaningful IaC adoption. > In the tech industry, we can be guilty of the same crime sometimes. Certain practices get ingrained into the profession to the point where we forget exactly why we did it in the first place. But in school he hadn't known why he did it in the first plave. And more often in tech I see cargo cult practices that people don't underst…

The real world don't care about feelings.Feelings are extremely subjective making these kind of statements quite vague.

As a person with alexithymia, this is so confusing, I have no idea what "feels good" is supposed to mean. I know it's not bad, but that's a big spectrum of meaning. Good doesn't mean great or brilliant either. Just confusing.

Emotional blindness: https://en.wikipedia.org/wiki/Alexithymia

Re: Infrastructure as Code Should Feel

#9
I've been doing IaC in AWS since terraform 0.11 (now added Azure and AWS CDK to the mix).

Most cloud providers (and don't get me started with software platforms) support IaC as a complete afterthought. The day you decide to use IaC, you will have chosen to spend your days fighting against their APIs to make things nice and immutable.

Moreover, most languages and tooling are rather immature. Things like secrets, testing, CI/CD, multi repo infra, collaboration, describing stuff that changes itself (e.g. databases that update automatically) are not well understood, solved problems.

Consequently I'm quite diligent when writing my infra as code nowadays. I reserve it for things that really play nice with immutability and are not likely to change all the time. Also, as the author says, not coupling infra code with apllication code is gold advice.

Re: Infrastructure as Code Should Feel

#10
I like Terraform but I've grown to not fully trust its plan output.

There are lots of cases where you can plan something successfully without errors but then when you go and apply it you'll run into errors and now your infrastructure is in a half working state where some resources applied successfully and others failed.

Post reply on HN