News for hackers. Stuff that matters.
Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by auslander on Monday November 26, 2018 @06:32PM (#18537818)
... , then replace all that Terraform code with Cloudformation templates. You will get 5x less code, native vs third party tool v0.11 and my respect :)
Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by devonkim on Tuesday November 27, 2018 @10:03AM (#18542768)
I've written tens of thousands of lines of both and find Terraform requires me to write many, many less lines of code because I don't need to break out Lambda functions nor deploy a random web service to serve as a Custom Resource. I don't need to write code to search for AMIs in Terraform, I have a data provider for those kinds of things. CloudFormation is sometimes substantially behind Terraform in support for certain flags. And lastly, Terraform supports a lot more different services than just a single cloud provider - it truly is an infrastructure description language in comparison to the much more tightly constrained CloudFormation. However, CF is my go-to when we're talking about application deployments based upon instances over Terraform - that's when Terraform starts falling apart and requiring tons of code over CF. In fact, I think the Terragrunt author solved his app deployment problem in Terraform by generating CloudFormation stacks from his Terraform - good luck doing the reverse from CloudFormation!

Furthermore, transitioning from Cloudformation to Terraform is much, much easier than the reverse - you can't import existing resources into CloudFormation management, period (you can't even write the aws-prefixed tags to try to confuse it unless you're an AWS employee or something).

Nothing wrong with starting with CloudFormation or any other provider-native deployment description language if you're 100% in AWS and will stay that way. For the rest of us, Terraform is basically the only choice that can work besides paying for eye-watering expensive boutique tools that were developed a decade ago and have more limitations than Terraform.

Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by yjftsjthsd-h on Monday November 26, 2018 @06:42PM (#18537869)
You are the first person I've encountered who preferred cloudformation over terraform. CF has far worse ability to cope with out-of-band changes or problems in general (in contrast to TF, which can usually just `apply` things back into compliance), and somehow gets feature support slower than TF in spite of being 1st party.
Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by auslander on Monday November 26, 2018 @06:45PM (#18537887)
> just `apply` things back into compliance

If your things are wandering out of compliance by themselves, you have bigger problems, imho.

Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by ucarion on Monday November 26, 2018 @08:29PM (#18538535)
Likely the commenter is referring to development environments, where it is common for infra to be put in bizarre states by actors performing changes. Terraform alone is does not constitute change control.
Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by scarface74 on Monday November 26, 2018 @07:03PM (#18537986)
Then don’t do that. But CF at least now has drift detection

But what I prefer about CF is the “easy button”. If something weird happens or I can’t figure out something, I can use our business support plan with AWS.

Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by yjftsjthsd-h on Monday November 26, 2018 @08:17PM (#18538474)
> drift detection

As of 2 weeks ago[0] drift detection exists, but coverage is poor[1].

[0] https://aws.amazon.com/about-aws/whats-new/2018/11/aws-cloud...

[1] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGui...

Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by latchkey on Monday November 26, 2018 @07:26PM (#18538153)
Terraform is multi cloud, which has its benefits for a few of us.
Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by jacobr1 on Monday November 26, 2018 @09:48PM (#18538916)
Also multi-service. We are an all AWS shop, but integrating things like DataDog monitors and alerting into our infrastructure, or github organization membership linked to IAM makes things much more maintainable.
Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by auslander on Tuesday November 27, 2018 @05:35AM (#18541168)
That multicloud thing is just a marketing trick. You'll never get it, different clouds have different resource types, each having different set of parameters. Want two clouds, write two independent infra codebases.

https://itnext.io/things-i-wish-i-knew-about-terraform-befor...

Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by pm90 on Tuesday November 27, 2018 @02:02AM (#18540141)
Only if you use aws