GCP Professional Cloud Architect Practice Question
Your platform team is preparing a reusable Terraform module that creates a regional Google Kubernetes Engine (GKE) cluster together with supporting IAM roles and Cloud Monitoring dashboards. The module will be published to your private Terraform Registry, where automated validation checks expect a conventional layout so that consumers can quickly understand the module's inputs and outputs. Which set of files should reside in the root of the module directory to satisfy these best-practice expectations?
Terraform documentation and the Registry publishing guidelines recommend that every reusable module include a main.tf file for resource definitions, a variables.tf file declaring required or optional inputs, an outputs.tf file that exposes values produced by the module, and a README.md file that documents usage and examples. This canonical structure is recognised by automated checks and helps downstream teams discover how to consume the module. Other files such as backend.tf, provider.tf, or terraform.tfvars are either defined in the root configuration that calls the module or are not suitable for version-controlled distribution, so they are not required in the module's top-level directory.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the main.tf file in a Terraform module?
Open an interactive chat with Bash
Why is a README.md file essential in Terraform modules?
Open an interactive chat with Bash
What is the difference between variables.tf and terraform.tfvars?
Open an interactive chat with Bash
What is the purpose of the Terraform files: main.tf, variables.tf, outputs.tf, and README.md?
Open an interactive chat with Bash
Why is backend.tf not included in the root module directory?
Open an interactive chat with Bash
What differentiates variables.tf from terraform.tfvars?
Open an interactive chat with Bash
GCP Professional Cloud Architect
Managing implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .