←back to thread

52 points birdculture | 1 comments | | HN request time: 0.27s | 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 #
1. miduil ◴[] No.46182179[source]
testability and developability, ideally you structure your terraform/terragrunt code in a way that you can bootstrap an almost equivalent test environment. For example when using "AWS Well Architected"-method you would be able to bootstrap a similar environment on a separate AWS account that's part of your organization.

Unfortunately, terraform module system is extremely lacking and in many ways you're totally right - if your module is just replicating all the provider arguments it just feels wrong.