Question 540
At Quartzwell Retail Infrastructure, an authorized infrastructure engineering team manages a Terraform 1.12 and HCP Terraform environment. The team encounters the following situation: an engineer exports all Terraform output values as JSON to a public build log believing sensitive markers will redact them. 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
Apply logging and artifact controls to machine-readable Terraform outputs. This control addresses terraform output -json secret caveat because machine-readable output may reveal sensitive values even when the human-readable display masks them. The original implementation remedy remains: Restrict terraform output -json to approved secure consumers and avoid leaking secret output values.
Incorrect Answers
“Keep environment variable files reviewed and access-controlled” addresses a different recurring failure: Variable values are separate from the reusable desired-state logic. For the condition in this question, maintain “Apply logging and artifact controls to machine-readable Terraform outputs” because machine-readable output may reveal sensitive values even when the human-readable display masks them.
That review protects the control associated with: Time delays do not express resource readiness or graph dependencies reliably. It does not directly prevent the stated recurrence, which concerns: Machine-readable output may reveal sensitive values even when the human-readable display masks them. The appropriate guardrail is “Apply logging and artifact controls to machine-readable Terraform outputs”.
This safeguard is for the dependency described by: Backend initialization happens before normal input expression evaluation. The continuing risk here is determined by: Machine-readable output may reveal sensitive values even when the human-readable display masks them. The targeted safeguard is “Apply logging and artifact controls to machine-readable Terraform outputs”.