Question 5 of 10Pro Only

What are Terraform modules, and how do they promote code reuse? Explain the difference between root modules, child modules, and published modules.

Sample answer preview

Terraform modules are containers for multiple resources that are used together. A module is simply a directory containing Terraform configuration files. Modules allow you to organize your infrastructure code, promote reuse, and encapsulate complexity.

moduleroot modulechild moduleTerraform Registrymodule sourceinput variables

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more DevOps Engineer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime