Question 760
A child module defines a required environment input, but the root module also has a variable named environment and the child receives no value. Which action most directly satisfies the requirement in this situation?
Explanation
Correct Answer
Input variables are scoped to modules and are not implicitly inherited merely because names match. The child module evaluates with the caller's intended environment value.
Incorrect Answers
Registry module sources support a version argument for controlled module selection. Pass the root variable explicitly as an argument in the child module block.
Module source addresses identify where Terraform obtains reusable configuration. The child module evaluates with the caller's intended environment value.
Module composition connects outputs and inputs between separate reusable modules. Pass the root variable explicitly as an argument in the child module block.