HashiCorp Certified: Terraform Associate (003) — Question 3

Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

Answer options

Correct answer: B

Explanation

The correct answer is B because utilizing an encrypted backend ensures that sensitive data within the state files is protected from unauthorized access. Option A is ineffective since deleting the state file can lead to loss of necessary infrastructure details. Option C does not directly address the state file issue, and option D is not a reliable solution as it could lead to inconsistencies or errors in the state management.