HashiCorp Certified: Terraform Associate — Question 137
You want to share Terraform state with your team, store it securely, and provide state locking.
How would you do this? (Choose three.)
Answer options
- A. Using the remote Terraform backend with Terraform Cloud / Terraform Enterprise.
- B. Using the local backend.
- C. Using the s3 terraform backend. The dynamodb_field option is not needed.
- D. Using an s3 terraform backend with an appropriate IAM policy and dynamodb_field option configured.
- E. Using the consul Terraform backend.
Correct answer: A, D, E
Explanation
The correct answers A, D, and E provide secure state sharing and locking features. Option A offers a fully managed solution with Terraform Cloud/Enterprise. Option D ensures state locking by using an S3 backend with DynamoDB for locking. Option E allows for distributed state management with Consul. Option B is incorrect as the local backend does not support team collaboration, and option C lacks the necessary features for state locking.