Question 440
At Northbridge Data Platforms, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: a new subnet configuration needs the VPC ID but the developer manually copies a value from the console. 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 direct references for managed parent-child infrastructure. This control addresses data source id reference to managed resource because expression references preserve relationships and allow Terraform to infer dependencies. The original implementation remedy remains: Reference the VPC managed resource attribute from the dependent block.
Incorrect Answers
That review protects the control associated with: Data sources read information rather than reconciling object lifecycle. It does not directly prevent the stated recurrence, which concerns: Expression references preserve relationships and allow Terraform to infer dependencies. The appropriate guardrail is “Use direct references for managed parent-child infrastructure”.
This safeguard is for the dependency described by: Terraform may convert compatible primitive values but a typed module should define the intended representation. The continuing risk here is determined by: Expression references preserve relationships and allow Terraform to infer dependencies. The targeted safeguard is “Use direct references for managed parent-child infrastructure”.
That review protects the control associated with: Module source packages must be installed locally for evaluation. It does not directly prevent the stated recurrence, which concerns: Expression references preserve relationships and allow Terraform to infer dependencies. The appropriate guardrail is “Use direct references for managed parent-child infrastructure”.