4 ms·
>Infrastructure as code. Store it in git. Profit. Ok. But so is CloudFormation YAML files, mostly. So is the advantage of Teraform that it works beyond AWS?
by SlowRobotAhead 7y ago
>Infrastructure as code. Store it in git. Profit.
Ok. But so is CloudFormation YAML files, mostly.
So is the advantage of Teraform that it works beyond AWS?
- dvcrn 7y agoFor me yes. I can do things like: Spinup a kubernetes cluster, add a deployment with the latest image from my docker registry, add a loadbalancer with an external IP and create a cloudflare A record for my domain with that IP - all within the same tool.
- SlowRobotAhead 7y agoOk, but if you are (as in my case) staying entirely in AWS dynamo, lambda, E3, and IoT Core... it seems less important. I never leave the AWS ecosystem at all. I’m not challenging what you do, just trying to figure out what makes sense for me.
- mirceal 7y agohuge difference between storing the infrastructure definition vs storing the infrastructure state. cloudformation manages the state for you and will not fuck it up / allow you to fuck it up
- 420codebro 7y agoMy opinion? Because CloudFormation is full of shit regarding "always being able to rollback". After dealing with a 100+ failed CF rollbacks, I stopped caring about that phantom feature. That's around the same time I started using Terraform. At this point I only use CF for things I can not put in TF directly - namely ASGs. Regarding IaC "rollback" capabilities - I don't think it really exists in a way that makes it reasonable for people to depend on. The path forward is to stand up new infrastructure, canary test, etc - then steer via load-balancers the traffic to your new nodes, and then finally destroy the old ones. I loathe trying to maintain a fleet of nodes that can drift into various states of dis-repair. I love the idea of blowing everything away and having a 100% clean and predictable environment again. It makes me happy. </end rant> Hope that helps - I really have fallen in love with Terraform after having to cobble down N number of CLI tools for various cloud providers, hypervisor providers, etc. Terraform at least gives an easy to use language and abstracts me above recursive API call logic that I would otherwise need to write for basic things.
- SlowRobotAhead 7y agoThat does help. I’ve never heard about CF not working as expected. Hmm, I’ll have to look into it some more. I really like the idea of layering my application into dynamo set up, lambdas, polices, etc. and being able to update a specific layer, pull it down and put the new one up. Last thing I want is more headache.