What is the difference between a root module and a child module?
IntermediateConceptIaC and Terraform Fundamentals
Answer
The root module is the directory where you run Terraform commands. Every other module is a child, called with a module block from the root or from another module. A module is just a folder of .tf files. Only the root can configure backends and, ideally, providers; children receive providers from the caller.
More on IaC and Terraform Fundamentals
What is Infrastructure as Code and why do teams use it?BeginnerWhat is the difference between declarative and imperative infrastructure tools?BeginnerWhat is Terraform and what problem does it solve?BeginnerWhat is HCL and can Terraform use anything else?BeginnerWhich files make up a typical Terraform root module?BeginnerHow does Terraform work internally?Advanced