HashiCorp
TERRAFORM-ASSOCIATE-003 · Question #139
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
The correct answer is D. Store the state in an encrypted backend. This is a secure way to protect sensitive data in the state file, as it will be encrypted at rest and in transit. The other options are not recommended, as they could lead to data loss, errors, or security breaches.
Implement and Maintain State
Question
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Options
- AEdit your state file to scrub out the sensitive data
- BAlways store your secrets in a secrets.tfvars file
- CDelete the state file every time you run Terraform
- DStore the state in an encrypted backend
How the community answered
(21 responses)- A5% (1)
- B14% (3)
- C5% (1)
- D76% (16)
Explanation
This is a secure way to protect sensitive data in the state file, as it will be encrypted at rest and in transit. The other options are not recommended, as they could lead to data loss, errors, or security breaches.
Topics
#encrypted backend#state security#sensitive data#secrets management
Community Discussion
No community discussion yet for this question.