nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #57

A module can always refer to all variables declared in its parent module.

The correct answer is B. False. A module cannot always refer to all variables declared in its parent module, as it needs to explicitly declare input variables and assign values to them from the parent module's arguments. A module cannot access the parent module's variables directly, unless they are passed as…

Interact with Terraform modules

Question

A module can always refer to all variables declared in its parent module.

Options

  • ATrue
  • BFalse

How the community answered

(41 responses)
  • A
    22% (9)
  • B
    78% (32)

Explanation

A module cannot always refer to all variables declared in its parent module, as it needs to explicitly declare input variables and assign values to them from the parent module's arguments. A module cannot access the parent module's variables directly, unless they are passed as input

Topics

#module variable scope#module inputs#encapsulation#variable passing

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice