Live data from Hacker News

Ask HN: Why was Terraform created?

news.ycombinator.com

11–20 of 64 posts

Re: Ask HN: Why was Terraform created?

#11
Not an expert nor a user of terraform, but I'm currently learning about the tool, and I like to learn by reading from books and docs, rather than diving straight in and doing.

Based on what I've read, while Hashicorp tools may look like their only contribution is platform agnostic tooling, a deep dive into the docs reveals a focus on dynamically changing architecture and providing tooling to scale dynamically changing architectures in short time scales to any number of resources (i.e. not just machines / VM / containers / compute resources, but resources like users, user-generated resources, user-generated secrets etc.)

My impressions thus far is that Hashicorp is aware of the variety of alternative tools, that's why their certifications / training / professional services are only available for the tools truly core to supporting dynamic architectures : Terraform, Consul and Vault.

https://www.hashicorp.com/customer-success/professional-serv...

https://www.hashicorp.com/customer-success/enterprise-academ...

https://www.hashicorp.com/certification

Re: Ask HN: Why was Terraform created?

#12

It's probably overkill for your use case. If you're on AWS you can stick to CloudFormation; with something this simple, you can indeed just (as you suggest) use a bash script. But a lot of applications have infrastructure far, far more complex than a single service running in a container and S3/RDS. It may involve a large number of lambdas, networks, API gateways, firewalls, proxies, certificates, etc. Past a certain…

Then I guess it's a question to the startup I'm working at - why in the world did they overcomplicate so much stuff when in fact we have constant number of environments, workers, load balancers? In fact, every engineer in the company is very much aware on how our system operates and (I believe) could easily imitate whatever Terraform does with simple scripts.

Re: Ask HN: Why was Terraform created?

#13
post #12

It's probably overkill for your use case. If you're on AWS you can stick to CloudFormation; with something this simple, you can indeed just (as you suggest) use a bash script. But a lot of applications have infrastructure far, far more complex than a single service running in a container and S3/RDS. It may involve a large number of lambdas, networks, API gateways, firewalls, proxies, certificates, etc. Past a certain…

Then I guess it's a question to the startup I'm working at - why in the world did they overcomplicate so much stuff when in fact we have constant number of environments, workers, load balancers? In fact, every engineer in the company is very much aware on how our system operates and (I believe) could easily imitate whatever Terraform does with simple scripts.

Future-proofing, I assume. Better to have things in Terraform now than to have to move them all later as you grow the application. Moving things into Terraform can be quite hard, since you essentially need to figure out how to reproduce the entire infrastructure from scratch.

Re: Ask HN: Why was Terraform created?

#14
post #12

Earlier quoted context omitted.

Then I guess it's a question to the startup I'm working at - why in the world did they overcomplicate so much stuff when in fact we have constant number of environments, workers, load balancers? In fact, every engineer in the company is very much aware on how our system operates and (I believe) could easily imitate whatever Terraform does with simple scripts.

Future-proofing, I assume. Better to have things in Terraform now than to have to move them all later as you grow the application. Moving things into Terraform can be quite hard, since you essentially need to figure out how to reproduce the entire infrastructure from scratch.

YAGNI.

Re: Ask HN: Why was Terraform created?

#15
To get data in Terraform you have outputs and you can display the data.

Terraform helps you to have a unified way to manage your resources, sure the bash scripts works for you, but what happens if you leave the company? Somebody else has to maintain your shell script.

What happens if somebody else is changing the infrastructure and they're not familiar with your shell script, they need time to dig in to figure things out and then update it, and in best case test it.

And you need to keep your scripts up to date, you need to build in fault tolerance, you need to think how you're going to deploy new resources. How are you going to handle destroying resources?

And on top of that you also need to learn the cloud Provider CLI tools or API to know what kind of calls to execute.

It just provides a standardised way to manage your infra.

Re: Ask HN: Why was Terraform created?

#16
post #14

Earlier quoted context omitted.

Future-proofing, I assume. Better to have things in Terraform now than to have to move them all later as you grow the application. Moving things into Terraform can be quite hard, since you essentially need to figure out how to reproduce the entire infrastructure from scratch.

YAGNI.

You won't need it. But you'll probably want it, since at most start-ups complexity grows over time.

Re: Ask HN: Why was Terraform created?

#17
post #15

To get data in Terraform you have outputs and you can display the data. Terraform helps you to have a unified way to manage your resources, sure the bash scripts works for you, but what happens if you leave the company? Somebody else has to maintain your shell script. What happens if somebody else is changing the infrastructure and they're not familiar with your shell script, they need time to dig in to figure things…

My complaint is that there shouldn't be unknown or uncertain states in the first place. Infrastructure should be a finite state machine, not infinite. Failure in transition from state A to state B should result in rolling back to state A, not arbitrary state X.

Re: Ask HN: Why was Terraform created?

#18
post #17
post #15

To get data in Terraform you have outputs and you can display the data. Terraform helps you to have a unified way to manage your resources, sure the bash scripts works for you, but what happens if you leave the company? Somebody else has to maintain your shell script. What happens if somebody else is changing the infrastructure and they're not familiar with your shell script, they need time to dig in to figure things…

My complaint is that there shouldn't be unknown or uncertain states in the first place. Infrastructure should be a finite state machine, not infinite . Failure in transition from state A to state B should result in rolling back to state A, not arbitrary state X.

Sometimes you cannot rollback. The peril of infrastructure is that it is an imperfect, living state machine. Terraform is a compromise between runbooks and deterministic definitions. Some operations you are committed to the change and will need to figure out exceptions on the other side of the apply.

(infra engineer in a previous life when Terraform was first released)

Re: Ask HN: Why was Terraform created?

#19
Just because you clicked in some webui to do something doesn't mean it's save.

You still need to write how to do it, how to bootstrap it and why you do things.

We have a basic tf layer, which does make it well documented, easily extendable and repeatable.

Yes we do destroy the whole setup and recreate it. Often no but still.

After the tf layer, there is only k8s which is also 100% IaC.

Also sry to say but we are experts, learning something like tf should not be a big hurdle.

What I saw in old sysadmin setups: tons of snow flake VMS no one knows why they exist, random setups different security versions on it.

If you don't have any tool to automate things you will not do it.

Feel free to create a small infra setup manually if you prefer, I prefer to codify it once and can recreate it instead of documenting it in some word doc.

Tf is not perfect btw.

Re: Ask HN: Why was Terraform created?

#20
post #17
post #15

To get data in Terraform you have outputs and you can display the data. Terraform helps you to have a unified way to manage your resources, sure the bash scripts works for you, but what happens if you leave the company? Somebody else has to maintain your shell script. What happens if somebody else is changing the infrastructure and they're not familiar with your shell script, they need time to dig in to figure things…

My complaint is that there shouldn't be unknown or uncertain states in the first place. Infrastructure should be a finite state machine, not infinite . Failure in transition from state A to state B should result in rolling back to state A, not arbitrary state X.

Implementations across cloud providers are going to be different, and I don't know how AWS vs GCP vs Azure is handling failure, so now it's your responsibility.

Now the problem has grown from just write a few lines of bash script to, "create a script that can handle failure and reverts it so a known state", this is a more complex problem than just creating a resource. And now multiply this for all different resources, EC2, AKS, RDS, Security Groups ... and keep up with the API.

And if somebody joins your team, and wants to contribute to the solutions, they're going to have to understand the codebase.

Post reply on HN