Question 780
At Zenithpark Health Research, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: two sibling modules define var.name and one accidentally assumes they share the same value automatically. Choose the technically best Terraform Associate 004 practice response to this particular infrastructure case. Which operational control addresses the risk long term?
Explanation
Correct Answer
Use explicit module arguments rather than relying on name collisions. This control addresses variable scope across sibling modules because sibling modules have separate input scopes despite matching variable names. The original implementation remedy remains: Pass the required values to each module independently or connect outputs explicitly.
Incorrect Answers
“Test provider inheritance independently of module variable inputs” addresses a different recurring failure: Variables configure ordinary module data while provider mappings select API identity and context. For the condition in this question, maintain “Use explicit module arguments rather than relying on name collisions” because sibling modules have separate input scopes despite matching variable names.
That review protects the control associated with: Semantic versions identify releases but compatibility must still be assessed against module interfaces. It does not directly prevent the stated recurrence, which concerns: Sibling modules have separate input scopes despite matching variable names. The appropriate guardrail is “Use explicit module arguments rather than relying on name collisions”.
This safeguard is for the dependency described by: Sensitive marking suppresses display but ordinary sensitive resource attributes may still be stored in state. The continuing risk here is determined by: Sibling modules have separate input scopes despite matching variable names. The targeted safeguard is “Use explicit module arguments rather than relying on name collisions”.