Question 460
A Terraform associate evaluates: A team needs to distinguish Git ref query pinning from registry module version constraints. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The case says: A team needs to distinguish Git ref query pinning from registry module version constraints. The directly relevant Terraform response is: Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it. This addresses the related failure mode: Consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. Validate the result by checking: The downloaded module resolves to the approved source and revision recorded in code and dependency inventory. The selection matches this objective, rather than a different Terraform administration task.
The observed situation is: A team needs to distinguish Git ref query pinning from registry module version constraints. The acceptance evidence is: The downloaded module resolves to the approved source and revision recorded in code and dependency inventory. It verifies the corrective approach (Use a valid Git or registry module source and pin a ref or compatible module version where the source type supports it.) and controls the risk: Consuming a mutable remote branch without an intended ref can change module behavior unexpectedly. Checking an unrelated Terraform setting would not prove the stated requirement was met.
Incorrect Answers
Use an explicit local filesystem path in a module source to reuse checked-in configuration from a child directory. This belongs to Local module source paths (official objective 5a). Its separate risk is that a nonexistent local module path prevents init from loading the module, and a module name is not itself a source path. The question instead tests Remote module sources and pinning; that other safeguard alone does not verify it.
After the reviewed upgrade, module contents and plan correspond to the intended remote version. This addresses Refresh installed module code after source updates (official objective 5d). The separate hazard is that a cached downloaded module may not reflect a new selected registry release or revised source until reinitialized. It does not by itself satisfy the case-specific requirement for Remote module sources and pinning.
Directly referencing a child's local or resource name from the parent violates module encapsulation and may fail validation. This does not provide the required Remote module sources and pinning action-and-evidence pair.