←back to thread

52 points birdculture | 1 comments | | HN request time: 0s | source
Show context
jamesbelchamber ◴[] No.46182053[source]
"Don't Repeat Yourself" is a great rule of thumb which, at least in writing Terraform configuration, became absolute tyranny. Strange webs of highly coupled code with layers of modules, all in an effort to be DRY - almost everywhere I've seen Terraform.

Trying to explain why a little duplication is preferable to bad abstractions, and specifically preferable to tightly coupling two unrelated systems together because they happened to sort-of interact with the same resource, was endless and tiring and - ultimately - often futile.

replies(6): >>46182179 #>>46182504 #>>46182524 #>>46182757 #>>46182935 #>>46183063 #
esafak ◴[] No.46182504[source]
Were they deduplicating incorrectly, or does terraform lack the ability to do so well?
replies(1): >>46182882 #
1. baby_souffle ◴[] No.46182882[source]
Bit of both, really. There are some common techniques that would be a lot simpler or more robust if terraform would support variables and expressions like lambdas in more places (tofu is getting there…) but it’s also a failure to realize that terraform is ,rant to composite many small modules together and not just pass 150 different inputs into an Omni module.