Live data from Hacker News

Terraform 0.15 General Availability

hashicorp.com

191–200 of 239 posts

Re: Terraform 0.15 General Availability

#191
post #68

Earlier quoted context omitted.

Terraform allows us to implement development practices into our sysadmin lives. Such as code reviews, etc. For example, at my work this is what i do to apply changes to our AWS setup: 1. Fetch the latest version of our git repo. 2. Create a new git branch named after the Jira ticket im working on. 3. Solve the jira ticket by modifying the terraform code accordingly. 4. Submit a pull request and assign one of my colle…

Reading the sister comments, I kind of understand the appeal of terraform for huge/multi cloud infra systems. Now, managing changes in code doesn’t look too far from dealing with kubernetes’ json/yml config and applying them to the current cluster, provided it would be trickier when expanding to multiple cluster or doing complex orchestrating. I guess TF makes a lot more sense for on-premise, bare metal VMs ?

> I guess TF makes a lot more sense for on-premise, bare metal VMs ?

Sure. And also for Kubernetes json/yml. You don't just create infrastructure but it will also change -> delete/create.

And establishing a process how to delete your Kubernetes json/yml files in some form of codereview or in some way so you know what it actually deployed, you end up with a tool like terraform.

Re: Terraform 0.15 General Availability

#192

I do not like terraform and I believe it's a terrible tool. Here is the error you get when it fails: Terraform does not automatically rollback in the face of errors. Instead, your Terraform state file has been partially updated with any resources that successfully completed. Please address the error above and apply again to incrementally change your infrastructure. If that error does not give you pause, I don't know…

Roll back is one reason I choose AWS Cloudformation over Terraform. And also I do not see the reason for Terraform in my use case as we run only on AWS. No point in not using AWS native tools.

I don't use CF, but how does it handle rolling back a delete (thus recreating a resource) and resource ARNs? Is it using some functionality not available to other tools?

I always found tf's lack of rollback ability, basically admitting there is no way to really rollback to the exact state, ARNs and all, so it isn't going to try.

Re: Terraform 0.15 General Availability

#193

Perhaps off-topic but how have people upgraded TF codebases to new versions? Just last year we had a big effort to upgrade a huge code-base from 0.11 to 0.12. I feel like it should be a lot smoother than a full-team full-sprint effort.

As no one seems to have mentioned anything, version numbers below 1.0 are generally considered unstable in terms of API interface (like HCL in this case) so if you'd like to avoid similar things in the future (with either Terraform or other tools), you're best to wait until they at least release version 1.0.

Re: Terraform 0.15 General Availability

#194

Earlier quoted context omitted.

Especially initial deploys that rollback and you have to delete the stack to try to deploy again. Waste of time. On the whole terraform is much faster too.

here is a hint for you: you can tell cloudformation to nuke everything in case it fails.

How would you do that with `sam deploy`

https://docs.aws.amazon.com/serverless-application-model/lat...

Re: Terraform 0.15 General Availability

#195
post #170

Earlier quoted context omitted.

Especially initial deploys that rollback and you have to delete the stack to try to deploy again. Waste of time. On the whole terraform is much faster too.

CF gives you both behaviors, you have option to select which one you prefer.

How would you do that with `sam deploy`

https://docs.aws.amazon.com/serverless-application-model/lat...

Re: Terraform 0.15 General Availability

#196
post #185

One of my biggest annoyances with Terraform is how you cannot start out by creating your state remotely - you have to run it first with local state and then move it to a remote backend on a subsequent run.

Completely agree! My company has pretty strict rules for creating infrastructure in our upper environments. Devs are not able to do it and we want everything to run through our CI/CD pipeline. We either have to ask our cloud team to create the bucket or hack up our build file to add it.

It would be nice, on the first run of terraform init, if it would check for the remote state bucket and then ask if you would like to create it if it does not exist.

Re: Terraform 0.15 General Availability

#197
post #95

I do not like terraform and I believe it's a terrible tool. Here is the error you get when it fails: Terraform does not automatically rollback in the face of errors. Instead, your Terraform state file has been partially updated with any resources that successfully completed. Please address the error above and apply again to incrementally change your infrastructure. If that error does not give you pause, I don't know…

> use whatever the cloud you are using has built it (cloudformation, deployment manager, etc). Not applicable if you're deploying infra across cloud (we do that across a dozen cloud providers!). Without terraform, it'll bring us tears. > Or about when it just loses tracks of resources. Never had this in years of using terraform. These should be qualified with how often they occur. > Terraform does not automatically r…

> Checkout the code from before the change and apply again. I've done this numerous times and it's been as good as a natively supported rollback.

Almost as good as native but not quite. Often times applys fail because you've introduced new providers with new resources. If you checkout the previous code and apply again then TF will explode because there's resources in the statefile that are now missing providers. So you have to manually patch in the provider from the new version on top of the old version just to remove the resources.

Re: Terraform 0.15 General Availability

#198
post #135

Hijacking a bit, but does anyone have any good resources/guides around managing terraform state in larger organizations? Terraform enterprise seems to address this but I was wondering if there's workflows that allowed subsections of infrastructure (think teams or systems) and didn't rely on a re-evaluation of the entire organization's assets. So far the only approach I've seen is having protected high level (VPC, sub…

When it was up to me, I managed things with small projects, rigorous standardization of naming and tagging, and a shared “metadata” module that could look up all the details you needed based on region, account (from the provider) and VPC name. Takes some discipline but makes for much more efficient Terraform, IMO.

Re: Terraform 0.15 General Availability

#199

Earlier quoted context omitted.

I really wish they would support CDK in Go!

Getting started with the AWS Cloud Development Kit and Go > https://aws.amazon.com/blogs/developer/getting-started-with-...

We were talking about Terraform CDK here, not AWS CDK. It is cool that AWS CDK supports Go though!

Re: Terraform 0.15 General Availability

#200
post #84

Earlier quoted context omitted.

Can second that. Pulumi with Typescript is just absolutely awesome.

I don’t get why people like scripting it, declarative is fantastically simple. I don’t want to trace through loops, if statements, functions It does from these files declare my infra to these scripts when parser thru define my infer I get Logic in yaml/json is less ergonomic but templing makes us for it

I suspect you haven't tried Pulumi. It is declarative. Sometimes I just want to generate the declarations rather than type them out by hand.
Post reply on HN