- It feels like writing code instead of writing yaml.
- To the above you can define your own parameter object types in Terraform. To create a list parameter in cloudformation requires `CommaDelimitedList` which can only contain strings.
- To the above two points, your Terraform stacks can be DRY'd up a bit which makes them easier to read than a massive 1000 line cloudformation file.
- Terraform is run completely in your console which is faster and improves the developer experience.
- Resources are never "conditionally" replaced. They either are or are not. Don't know if this is still a thing in Cloudformation land but the resources change diff Terraform gives you is completely clear.
That all said I don't mind writing Cloudformation, but (again in my opinion) Terraform is vastly more powerful.
I’ll try it out. I’ve been writing CloudFormation and using SAM templates for some recent projects involving Lambda. Defining my general resources is easy enough but having to define through IAM roles and policies turns into a real pain super quick.
That’s an option for sure! For more complicated projects my preference goes to CDK. But for smaller projects CloudFormation is fine enough, especially if you use the extensions I described in the article.
That’s true if you’re familiar with programming and know how CloudFormation works. Adding a framework or abstraction layer requires certainly more skills from your end. This article is more suitable for people who want to deploy small projects quickly and don’t want to invest time to learn a framework.
CDK is significantly more comprehensible than CloudFormation. Particularly: it has patterns and convenciones baked in that let a few lines of code translate into 100s of lines of CloudFormation
i find cfn has a higher barrier to entry and is more verbose for small projects but scales much better than terraform (which breaks down entirely once you need to manage thousands of resources across more than handful of providers)
Shameless plug opportunity! On the topic of "more complication on top of cloudformation", I made a tool that lets you split up cloudformation files with import syntax.