Question 700
At Valewood Retail Infrastructure, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: an engineer references an ephemeral provider token directly from an ordinary output and Terraform rejects the expression. 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
Audit dataflow from temporary secrets to persistent configuration fields. This control addresses ephemeral resource context restriction because ephemeral values cannot flow into normal persisted output expressions. The original implementation remedy remains: Use the ephemeral value only in supported contexts such as provider configuration or write-only arguments.
Incorrect Answers
That review protects the control associated with: Ephemeral inputs are not persisted in state or plan and can configure providers in Terraform 1.12. It does not directly prevent the stated recurrence, which concerns: Ephemeral values cannot flow into normal persisted output expressions. The appropriate guardrail is “Audit dataflow from temporary secrets to persistent configuration fields”.
This safeguard is for the dependency described by: Explicit command-line variable assignments take precedence over defaults. The continuing risk here is determined by: Ephemeral values cannot flow into normal persisted output expressions. The targeted safeguard is “Audit dataflow from temporary secrets to persistent configuration fields”.
“Confirm provider resource support before designing service automation” addresses a different recurring failure: Providers implement service-specific resource CRUD and data source operations for Terraform. For the condition in this question, maintain “Audit dataflow from temporary secrets to persistent configuration fields” because ephemeral values cannot flow into normal persisted output expressions.