Question 510
A Terraform associate evaluates: An infrastructure repo depends on a private HCP Terraform registry module with documented semantic versions. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The observed situation is: An infrastructure repo depends on a private HCP Terraform registry module with documented semantic versions. The acceptance evidence is: An init downloads a compatible explicitly selected module version and the change is visible in review. It verifies the corrective approach (Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility.) and controls the risk: Without version control, an external registry module may change behavior across environments as newer releases appear. Checking an unrelated Terraform setting would not prove the stated requirement was met.
The case says: An infrastructure repo depends on a private HCP Terraform registry module with documented semantic versions. The directly relevant Terraform response is: Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility. This addresses the related failure mode: Without version control, an external registry module may change behavior across environments as newer releases appear. Validate the result by checking: An init downloads a compatible explicitly selected module version and the change is visible in review. The selection matches this objective, rather than a different Terraform administration task.
Incorrect Answers
Broad sensitive outputs can leak implementation details and secrets while coupling callers to module internals. This is relevant to Module outputs as a public interface (official objective 5c). Its distinct failure risk is that broad sensitive outputs can leak implementation details and secrets while coupling callers to module internals. The present question tests Registry module version selection, which this measure alone does not establish.
A child receives the exact values supplied at its module call and its variable declarations validate them. That addresses Child module input variable scope (official objective 5b), specifically the hazard that a child module that references an undeclared input variable cannot access a similarly named root variable automatically. Here the necessary action or evidence is the paired action An init downloads a compatible explicitly selected module version and the change is visible in review and separate validation Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility, not that separate control.
Run terraform init -upgrade when intentionally updating compatible downloaded modules, and inspect the resulting plan and source changes. This does not provide the required Registry module version selection action-and-evidence pair.