root module
The configuration in the directory where you run Terraform commands, which may call other modules.
In more detail
Environment choices, provider configuration and the backend belong in the root module, where the team can see them. The root can read child modules' outputs but never their internal resources.
Related terms
- Terraform module — A directory of Terraform files with inputs (variables) and outputs, which other configurations can call to reuse the same infrastructure design.
- child module — A module called from another module with a module block.
Taught in
- Return Values: Outputs And Locals — Infrastructure as Code with Terraform
- Why Modules: Composition Versus Monoliths — Infrastructure as Code with Terraform
- Calling Your Module And Passing Variables — Infrastructure as Code with Terraform
- Versions, The Lock File And Provider Aliases — HashiCorp Terraform Associate (004) Exam Prep
- Write, Plan, Apply, And What Init Prepares — HashiCorp Terraform Associate (004) Exam Prep
- Input Variables, Outputs, And Which Value Wins — HashiCorp Terraform Associate (004) Exam Prep
- Custom Conditions: Validation, Pre And Postconditions, Checks — HashiCorp Terraform Associate (004) Exam Prep
- Sensitive Data, Ephemeral Values And Secrets From Vault — HashiCorp Terraform Associate (004) Exam Prep
- Where Modules Come From — HashiCorp Terraform Associate (004) Exam Prep
- Module Scope: What Goes In, What Comes Out — HashiCorp Terraform Associate (004) Exam Prep
- Module Versions: Pin, Upgrade, Re-Initialise — HashiCorp Terraform Associate (004) Exam Prep