HashiCorp
TERRAFORM-ASSOCIATE-004 · 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.
Submitted by ricky.ec· Apr 18, 2026Work 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
(27 responses)- A93% (25)
- B7% (2)
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
#Terraform modules#Outputs#Local values#Module composition
Community Discussion
No community discussion yet for this question.