nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #246

If one of your modules uses a local value, you can expose that value to callers of the module by defining a Terraform output in the module's configuration.

The correct answer is A. True. Local values (locals {}) are scoped to a module and are not directly visible outside. To make them available to callers, you must define outputs in the module. Outputs act as the interface for exposing values from a child module to the root module.

Interact with Terraform Modules

Question

If one of your modules uses a local value, you can expose that value to callers of the module by defining a Terraform output in the module's configuration.

Options

  • ATrue
  • BFalse

How the community answered

(39 responses)
  • A
    79% (31)
  • B
    21% (8)

Explanation

Local values (locals {}) are scoped to a module and are not directly visible outside. To make them available to callers, you must define outputs in the module. Outputs act as the interface for exposing values from a child module to the root module.

Topics

#local values#module outputs#output values#module configuration

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice