Which statement about Terraform modules and nesting is true?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

Which statement about Terraform modules and nesting is true?

Explanation:
Terraform supports nesting modules to compose infrastructure from reusable pieces. A module can call other modules by including a module block inside its own configuration, passing inputs to the child and using the child’s outputs. This enables building complex architectures from smaller, well-defined components. This is why the statement that a module can call other modules is true: you can structure your configuration so a module acts as a parent and includes one or more child modules, at any depth, to assemble the full stack. Other statements don’t fit because modules can indeed be nested, they can be called from modules other than the root, and they don’t have to live in the same repository as the root module—the source can be a local path, a Git repository, or a registry.

Terraform supports nesting modules to compose infrastructure from reusable pieces. A module can call other modules by including a module block inside its own configuration, passing inputs to the child and using the child’s outputs. This enables building complex architectures from smaller, well-defined components.

This is why the statement that a module can call other modules is true: you can structure your configuration so a module acts as a parent and includes one or more child modules, at any depth, to assemble the full stack.

Other statements don’t fit because modules can indeed be nested, they can be called from modules other than the root, and they don’t have to live in the same repository as the root module—the source can be a local path, a Git repository, or a registry.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy