Here's an article on using DRY and KISS principles when working with Terraform. In my opinion, this is one of those articles that has a good idea behind it, but lacks a bit in delivery.
KISS vs DRY in Infrastructure as Code: Why Simple Often Beats Clever.
The main take-way is, as usual: use your own judgment when creating abstractions for your infra code. This also applies to all your code.
I do generally agree on the tooling part. This is what Adam Jacobs called "A 200% knowledge problem": when adding an abstraction (a wrapper), you need to understand not only your code and the underlaying technologies, but also each layer of your abstractions. Thus, do not add wrappers unless you have to.
However, this article also touches an important point: you may feel like it's time to introduce an abstraction, but in reality, it's not.
#terraform #iac
Post #2815
1.65K