HashiCorp Certified: Terraform Associate — Question 175

How would you output returned values from a child module in the Terraform CLI output?

Answer options

Correct answer: C

Explanation

The correct answer is C because to access outputs from a child module in the root module, you need to declare the output in both places. Option A is incorrect because declaring only in the root will not capture the child's output, while option B only addresses the child's output without making it available in the root. Option D is incorrect as there is a valid method to achieve this.