Recall & Review
beginner
What is a Terraform module?
A Terraform module is a folder with Terraform files that work together to create a part of your infrastructure. It helps organize and reuse code.
Click to reveal answer
beginner
Name the four common files in a Terraform module.
main.tf (resources), variables.tf (inputs), outputs.tf (outputs), and README.md (documentation).
Click to reveal answer
beginner
Why should you use variables in a Terraform module?
Variables let you customize the module without changing its code. They make modules flexible and reusable.Click to reveal answer
beginner
What is the purpose of outputs.tf in a Terraform module?
outputs.tf defines values that the module sends back after deployment, so other modules or users can use them.
Click to reveal answer
intermediate
How do you call a module inside another Terraform configuration?
Use the 'module' block with a source path to the module folder and provide required variables.
Click to reveal answer
Which file in a Terraform module usually contains resource definitions?
✗ Incorrect
main.tf contains the resource definitions that create infrastructure.
What is the main benefit of using modules in Terraform?
✗ Incorrect
Modules help organize and reuse code, making infrastructure easier to manage.
Where do you define input variables for a Terraform module?
✗ Incorrect
variables.tf is where input variables are declared.
How do you specify the source of a module when calling it?
✗ Incorrect
The 'source' argument tells Terraform where to find the module code.
What file should you add to explain how to use a Terraform module?
✗ Incorrect
README.md is used for documentation and usage instructions.
Describe the typical structure of a Terraform module and the purpose of each main file.
Think about how you organize code to make it reusable and clear.
You got /4 concepts.
Explain why using modules and variables in Terraform helps manage infrastructure better.
Consider how you would build something once and use it many times with different settings.
You got /4 concepts.