Which files make up a typical Terraform root module?
BeginnerConceptIaC and Terraform Fundamentals
Answer
Terraform loads every .tf file in the working directory as one module, so file names are convention only. We usually split into main.tf (resources), variables.tf, outputs.tf, providers.tf or versions.tf (the terraform block and providers), locals.tf, and terraform.tfvars for values. Subdirectories are not loaded unless called as modules.
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?BeginnerHow does Terraform work internally?AdvancedWhat is a provider in Terraform?Beginner