Composition versus deeply nested modules: which is better?

IntermediateConceptModules
Answer

Composition. A flat root that calls small modules and wires outputs to inputs is easy to read and test. Deep nesting (module calling module calling module) hides resources, makes passing providers painful, and amplifies breaking changes. We stay at one or two levels.

All Terraform questions Roadmap: Terraform

More on Modules