TA-002-P · Question #341
The Terraform CLI will print output values from a child module after running terraform apply.
The correct answer is A. True. After terraform apply successfully provisions or updates resources, the Terraform CLI prints the output values of the root module, which includes any output values exposed by its child modules. This provides immediate visibility into important information from your…
Question
The Terraform CLI will print output values from a child module after running terraform apply.
Options
- ATrue
- BFalse
How the community answered
(49 responses)- A88% (43)
- B12% (6)
Why each option
After `terraform apply` successfully provisions or updates resources, the Terraform CLI prints the output values of the root module, which includes any output values exposed by its child modules. This provides immediate visibility into important information from your infrastructure.
When `terraform apply` completes successfully, the Terraform CLI displays the output values of the root module. If a child module defines output values and the root module exposes them (e.g., by referencing them in its own output blocks), those values will indeed be printed to the console after the apply operation.
Terraform explicitly prints output values after a successful `apply` to provide important information about the deployed infrastructure, including those from child modules if they are exposed.
Concept tested: Terraform module outputs and apply
Source: https://developer.hashicorp.com/terraform/language/values/outputs
Topics
Community Discussion
No community discussion yet for this question.