HashiCorp TA-002-P Exam
HashiCorp Certified: Terraform Associate (Page 7 )

Updated On: 1-Feb-2026

When should you use the force-unlock command?

  1. You see a status message that you cannot acquire the lock
  2. You have a high priority change
  3. Automatic unlocking failed
  4. Your apply failed due to a state lock

Answer(s): C

Explanation:

Be very careful with this command. If you unlock the state when someone else is holding the lock it could cause multiple writers. Force unlock should only be used to unlock your own lock in the situation where automatic unlocking failed.


Reference:

https://www.terraform.io/language/state/locking https://www.terraform.io/cli/commands/force-unlock



Terraform can import modules from a number of sources – which of the following is not a valid source?

  1. FTP server
  2. GitHub repository
  3. Local path
  4. Terraform Module Registry

Answer(s): A


Reference:

https://www.terraform.io/language/modules/sources



Which of the following is available only in Terraform Enterprise or Cloud workspaces and not in Terraform CLI?

  1. Secure variable storage
  2. Support for multiple cloud providers
  3. Dry runs with terraform plan
  4. Using the workspace as a data source

Answer(s): A


Reference:

https://www.terraform.io/docs/language/providers/configuration.html



terraform validate validates the syntax of Terraform files.

  1. True
  2. False

Answer(s): A

Explanation:

The terraform validate command validates the syntax and arguments of the Terraform configuration files. Reference:
https://www.terraform.io/docs/cli/code/index.html


Reference:

https://www.terraform.io/cli/commands/validate



You have used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that will be deleted by Terraform.
Which command should you use to show all of the resources that will be deleted? (Choose two.)

  1. Run terraform plan -destroy.
  2. This is not possible. You can only show resources that will be created.
  3. Run terraform state rm *.
  4. Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval.

Answer(s): A,D


Reference:

https://www.terraform.io/docs/cli/commands/state/rm.html



Viewing page 7 of 91
Viewing questions 31 - 35 out of 449 questions



Post your Comments and Discuss HashiCorp TA-002-P exam prep with other Community members:

Join the TA-002-P Discussion