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

Updated On: 7-Feb-2026

FILL BLANK
Which flag would you add to terraform plan to save the execution plan to a file?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

  1. out=FILENAME

Answer(s): A

Explanation:

"You can use the optional -out=FILE option to save the generated plan to a file on disk, which you can later execute by passing the file to terraform apply as an extra argument. This two-step workflow is primarily intended for when running Terraform in automation. If you run terraform plan without the - out=FILE option then it will create a speculative plan, which is a description of the effect of the plan but without any intent to actually apply it."


Reference:

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



FILL BLANK
What is the name of the default file where Terraform stores the state?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

  1. terraform.tfstate

Answer(s): A

Explanation:

"This state is stored by default in a local file named "terraform.tfstate", but it can also be stored remotely, which works better in a team environment."


Reference:

https://www.terraform.io/language/state



A Terraform local value can reference other Terraform local values.

  1. True
  2. False

Answer(s): A

Explanation:

"The expressions in local values are not limited to literal constants; they can also reference other values in the module in order to transform or combine them, including variables, resource attributes, or other local values:"


Reference:

https://www.terraform.io/language/values/locals#declaring-a-local-value



Which of the following is not a valid Terraform collection type?

  1. list
  2. map
  3. tree
  4. set

Answer(s): C


Reference:

https://www.terraform.io/language/expressions/type-constraints#collection-types



When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.

  1. True
  2. False

Answer(s): B

Explanation:

"The terraform taint command informs Terraform that a particular object has become degraded or damaged. Terraform represents this by marking the object as "tainted" in the Terraform state, and Terraform will propose to replace it in the next plan you create." FYI - This command is deprecated. For Terraform v0.15.2 and later, we recommend using the -replace option with terraform apply instead. For Terraform v0.15.2 and later, we recommend using the -replace option with terraform apply to force Terraform to replace an object even though there are no configuration changes that would require it.


Reference:

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



Viewing page 14 of 91
Viewing questions 66 - 70 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