Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 291

The Terraform CLI will print output values from a child module after running terraform apply.

    Correct Answer: A

    The Terraform CLI will print output values from a child module after running terraform apply. Outputs defined in the child module are propagated to the root module, and then the root module can display these values in the CLI output. This is part of how Terraform surfaces useful information after the configuration is applied.

Discussion
Ramdi1Option: B

Output values have several uses: A child module can use outputs to expose a subset of its resource attributes to a parent module. A root module can use outputs to print certain values in the CLI output after running terraform apply.

PolitoMexOption: B

child modules send outputs to root module and then the root module prints the outputs.

Stargazer11Option: A

True. Output values are stored in state file. Only after a terraform apply, it knows that there are values in state file. Running terraform output output_name results in warning Warning: No outputs found. The state file either has no outputs defined, or all the defined outputs are empty. Please define an output in your configuration with the `output` keyword and run `terraform refresh` for it to become available. If you are using interpolation, please verify the interpolated value is not empty. You can use the `terraform console` command to assist.