What is the root module in Terraform?

  1. A pre-built module provided by HashiCorp
  2. A module with special permissions
  3. The main working directory containing the Terraform configuration files ✓
  4. A module stored in Terraform Cloud

Correct answer: The main working directory containing the Terraform configuration files

Option C is correct because in Terraform the root module is simply the working directory where you run terraform commands, containing the .tf configuration files that define your infrastructure at the top level of execution. Option A is incorrect because Terraform does not ship a pre-built root module; it does maintain a public registry of community and verified modules, but those are child modules called from configuration, not the root. Option B is incorrect because no module in Terraform has elevated or special permissions over another by virtue of being called root; the name reflects its position in the call hierarchy, not any privilege level. Option D is incorrect because a module stored in Terraform Cloud would be a remote module referenced as a child module, not the root module of a local configuration.

Topic: · terraform, modules, root module, infrastructure as code

Practice HashiCorp Terraform Associate (003) Questions Free