A. It can call the network module inside the modules folder
B. It must be empty to work correctly
C. It cannot use modules from subfolders
D. It only contains variables and no resources
Solution
Step 1: Understand root module and submodules
The root module can call other modules located in subfolders like modules/network.
Step 2: Evaluate options
It can call the network module inside the modules folder correctly states the root module can call the network module. Other options are false.
Final Answer:
It can call the network module inside the modules folder -> Option A
Quick Check:
Root module calls submodules = true [OK]
Hint: Root module can call modules in subfolders [OK]
Common Mistakes:
Thinking root module cannot use submodules
Assuming root module must be empty
Believing root module only has variables
4. You run terraform apply in your root module folder but get an error: "No configuration files found". What is the likely cause?
medium
A. You ran the command outside the root module folder
B. You forgot to run terraform init first
C. Your Terraform version is outdated
D. You have no internet connection
Solution
Step 1: Analyze the error message
"No configuration files found" means Terraform cannot find .tf files in the current folder.
Step 2: Identify common cause
This usually happens if you run terraform apply outside the root module folder where the files exist.
Final Answer:
You ran the command outside the root module folder -> Option A
Quick Check:
Run commands inside root module folder [OK]
Hint: Run commands inside root module folder with .tf files [OK]
Common Mistakes:
Assuming init missing causes this error
Blaming Terraform version or internet
Not checking current folder location
5. You want to organize your Terraform project with a root module that calls two child modules: network and compute. Which folder structure and root module code is correct?
hard
A.
root/
main.tf
network.tf
compute.tf
# main.tf does not call modules