Question 430
A Terraform associate evaluates: A security review asks why a password remains in state even after its input variable is marked sensitive. Select TWO complementary responses: the appropriate action AND direct evidence it worked.
Explanation
Correct Answers
The observed situation is: A security review asks why a password remains in state even after its input variable is marked sensitive. The acceptance evidence is: State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted. It verifies the corrective approach (Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions.) and controls the risk: A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. Checking an unrelated Terraform setting would not prove the stated requirement was met.
The case says: A security review asks why a password remains in state even after its input variable is marked sensitive. The directly relevant Terraform response is: Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions. This addresses the related failure mode: A secret can still appear in state despite sensitive=true and may require an ephemeral value path to avoid persistence. Validate the result by checking: State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted. The selection matches this objective, rather than a different Terraform administration task.
Incorrect Answers
An authorized workflow can consume the output while casual CLI display is redacted and backend access remains restricted. This belongs to Outputs and sensitive display control (official objective 4c). Its separate risk is that a sensitive output designation hides normal CLI disclosure but does not guarantee the underlying state contains no secret. The question instead tests Sensitive variables versus ephemeral variables; that other safeguard alone does not verify it.
Pass secrets through provider-supported write-only arguments and appropriate Vault or ephemeral sources, checking provider versions and never logging values. That addresses Provider write-only arguments and Vault integration (official objective 4h), specifically the hazard that using an ordinary resource argument can persist secrets in state, while unsupported write-only fields cannot be assumed to exist. Here the necessary action or evidence is the paired action State and plan inspections confirm approved temporary credentials are omitted and ordinary sensitive outputs are redacted and separate validation Use sensitive to redact CLI display and ephemeral for supported temporary values that must be omitted from plan and state, respecting context restrictions, not that separate control.
Treating a structured object like an untyped string makes required fields and attribute access error-prone. This addresses Object and tuple structural types (official objective 4d). The separate hazard is that treating a structured object like an untyped string makes required fields and attribute access error-prone. It does not by itself satisfy the case-specific requirement for Sensitive variables versus ephemeral variables.