Question 300
Consider a workflow where a small SaaS team must stop unauthorized users from viewing secrets embedded in state snapshots. What Terraform feature solves that specific problem?
Explanation
Correct Answer
Backend access controls protect potentially sensitive state. This meets the stated requirement to stop unauthorized users from viewing secrets embedded in state snapshots.
Incorrect Answers
Mark output as sensitive is intended to keep a generated secret from routine CLI display when listing outputs; sensitive output markings prevent accidental display but not storage. That is not the specific requirement to stop unauthorized users from viewing secrets embedded in state snapshots.
Avoid hardcoded credentials in .tf is intended to prevent long-lived API keys from entering Git history; configuration source history is difficult to sanitize after leaked keys. That is not the specific requirement to stop unauthorized users from viewing secrets embedded in state snapshots.
Use provider environment authentication is intended to supply API credentials to Terraform via supported ephemeral environment values; externalized authentication avoids embedding secrets in configuration. That is not the specific requirement to stop unauthorized users from viewing secrets embedded in state snapshots.






HashiCorp Certified: Terraform Associate (004) (Terraform Associate 004) Practice Tests