Question 840
At Brightmarsh Financial Systems, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a module is sourced from a Git URL but the caller adds version = 2.1 expecting Terraform to select a Git tag. 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
Document source-specific revision pinning patterns. This control addresses git module uses ref not registry version because the module version argument is for supported registry sources not arbitrary Git source addresses. The original implementation remedy remains: Use a supported ref parameter in the Git module source address instead of registry-only version syntax.
Incorrect Answers
This safeguard is for the dependency described by: Git branch names can move without modifications to the caller configuration. The continuing risk here is determined by: The module version argument is for supported registry sources not arbitrary Git source addresses. The targeted safeguard is “Document source-specific revision pinning patterns”.
“Pin non-registry module sources to approved revisions” addresses a different recurring failure: An unpinned Git module source can move independently of the caller configuration. For the condition in this question, maintain “Document source-specific revision pinning patterns” because the module version argument is for supported registry sources not arbitrary Git source addresses.
That review protects the control associated with: Run triggers coordinate downstream workspace evaluations after upstream changes. It does not directly prevent the stated recurrence, which concerns: The module version argument is for supported registry sources not arbitrary Git source addresses. The appropriate guardrail is “Document source-specific revision pinning patterns”.