Question 520
A Terraform associate evaluates: An operator wants to distinguish editing local module code from upgrading a downloaded remote module. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The observed situation is: An operator wants to distinguish editing local module code from upgrading a downloaded remote module. The acceptance evidence is: After the reviewed upgrade, module contents and plan correspond to the intended remote version. It verifies the corrective approach (Run terraform init -upgrade when intentionally updating compatible downloaded modules, and inspect the resulting plan and source changes.) and controls the risk: A cached downloaded module may not reflect a new selected registry release or revised source until reinitialized. Checking an unrelated Terraform setting would not prove the stated requirement was met.
The case says: An operator wants to distinguish editing local module code from upgrading a downloaded remote module. The directly relevant Terraform response is: Run terraform init -upgrade when intentionally updating compatible downloaded modules, and inspect the resulting plan and source changes. This addresses the related failure mode: A cached downloaded module may not reflect a new selected registry release or revised source until reinitialized. Validate the result by checking: After the reviewed upgrade, module contents and plan correspond to the intended remote version. The selection matches this objective, rather than a different Terraform administration task.
Incorrect Answers
The module resolves from the intended repository subdirectory and resources are addressed under module.NAME. This is relevant to Local module source paths (official objective 5a). Its distinct failure 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 present question tests Refresh installed module code after source updates, which this measure alone does not establish.
Broad sensitive outputs can leak implementation details and secrets while coupling callers to module internals. That is the exact risk associated with Module outputs as a public interface (official objective 5c), not the required Refresh installed module code after source updates outcome.
Use a version constraint on registry-sourced modules and review deliberate upgrades according to module compatibility. This addresses Registry module version selection (official objective 5d). The separate hazard is that without version control, an external registry module may change behavior across environments as newer releases appear. It does not by itself satisfy the case-specific requirement for Refresh installed module code after source updates.