TA-002-P · Question #17
If a module uses a local variable, you can expose that value with a terraform output.
The correct answer is A. True. True. A module can define an output block that references a local value (locals block), effectively exposing that computed or assigned value to the parent module or to the terraform output command. Local variables are scoped to the module they are declared in, but output blocks…
Question
If a module uses a local variable, you can expose that value with a terraform output.
Options
- ATrue
- BFalse
How the community answered
(22 responses)- A95% (21)
- B5% (1)
Explanation
True. A module can define an output block that references a local value (locals block), effectively exposing that computed or assigned value to the parent module or to the terraform output command. Local variables are scoped to the module they are declared in, but output blocks serve as the explicit interface for passing values outward, regardless of whether those values originate from resources, data sources, or locals.
Topics
Community Discussion
No community discussion yet for this question.