When should you not write a module?
IntermediateConceptModules
Answer
When it would be a thin wrapper around a single resource that exposes every argument of that resource; it adds a layer without adding policy or abstraction. A good module encodes opinions, hides repetition and has a small interface. Use modules for patterns (VPC with subnets and routes, service with ALB and ASG), not for one-to-one renaming.
More on Modules
What is a Terraform module and why use one?BeginnerHow do you call a module?BeginnerHow do inputs and outputs work with modules?BeginnerWhich module source types exist and where does `version` apply?IntermediateHow should you version and pin modules?IntermediateCan you use `count` and `for_each` on modules?Intermediate