Question 500
At Pineharbor Education Services, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: an engineer references .resource_id on a data source whose provider schema exposes .id instead. 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
Consult provider documentation when wiring data attributes. This control addresses data source attribute naming schema because provider data sources have explicit output attribute names defined by their schemas. The original implementation remedy remains: Inspect the source type's documented attributes and use the supported identifier.
Incorrect Answers
This safeguard is for the dependency described by: Module internals are scoped and root callers access declared module outputs. The continuing risk here is determined by: Provider data sources have explicit output attribute names defined by their schemas. The targeted safeguard is “Consult provider documentation when wiring data attributes”.
“Distinguish advisory checks from mandatory release conditions” addresses a different recurring failure: Terraform check assertions report warnings rather than acting like resource lifecycle hard failures. For the condition in this question, maintain “Consult provider documentation when wiring data attributes” because provider data sources have explicit output attribute names defined by their schemas.
That review protects the control associated with: Module variable type constraints define the shape accepted by module calls. It does not directly prevent the stated recurrence, which concerns: Provider data sources have explicit output attribute names defined by their schemas. The appropriate guardrail is “Consult provider documentation when wiring data attributes”.