nerdexam
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)
  • A
    5% (1)
  • B
    14% (3)
  • C
    5% (1)
  • D
    76% (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.

Full TERRAFORM-ASSOCIATE-003 Practice