Why is `depends_on` on a module a poor default?
AdvancedConceptModules
Answer
It makes every resource in the module depend on the target, so Terraform defers reading data sources inside and plans show wide "known after apply" changes. Prefer passing an output of the dependency as a real input so the graph carries the dependency precisely.
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