HashiCorp ta-002-p practice test

HashiCorp Certified: Terraform Associate Exam


Question 1

What advantage does an operations team that uses infrastructure as code have?

  • A. The ability to delete infrastructure
  • B. The ability to reuse best practice configurations and settings
  • C. The ability to autoscale a group of servers
  • D. The ability to update existing infrastructure
Answer:

B

Explanation:
155/156
Questions & Answers PDF
P-
156/156

Discussions

Question 2

As a developer, you want to ensure your plugins are up to date with the latest versions. Which
Terraform command should you use?

  • A. terreform providers- upgrade
  • B. terreform apply -upgrade
  • C. terreform refresh -upgrade
  • D. terreformn lnit -upgrade
Answer:

D

Discussions

Question 3

Choose the answer that correctly completes the sentence: _______backends support state locking.

  • A. All
  • B. No
  • C. Only local
  • D. Some
Answer:

D

Discussions

Question 4

Which of the following does terraform apply change after you approve the execution plan? Choose
two correct answers.

  • A. The execution plan
  • B. Terraform code
  • C. Cloud infrastructure
  • D. State file 154/156 Questions & Answers PDF P-
  • E. The .terraform directory
Answer:

C, D

Discussions

Question 5

Module version is required to reference a module on the Terraform Module Registry.

  • A. True
  • B. False
Answer:

B

Discussions

Question 6

What kind of configuration block will create an infrastructure object with settings specified in the
block?

  • A. state
  • B. provider
  • C. resource
  • D. data
Answer:

C

Discussions

Question 7

153/156
Questions & Answers PDF
P-
You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual
machine instance with an identical one without affecting the database. What is the best way to
achieve this using Terraform?

  • A. Use the Terraform taint command targeting the VMs then run Terraform plan and Terraform apply
  • B. Delete the Terraform VM resources from your Terraform code then run Terraform plan and terraform apply
  • C. Use the terraform apply command targeting the VM resources only
  • D. Use the terraform state rm command to remove the VM from state file
Answer:

A

Discussions

Question 8

You need to specify a dependency manually. What resource meta-parameter can you use lo make
sure Terraform respects thee dependency?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the
correct answer are accepted.

Answer:

depends_on

Discussions

Question 9

terraform validate reports HCL syntax errors.

  • A. True
  • B. False
Answer:

A

Discussions

Question 10

Which of the following is not a way to trigger terraform destroy ?

  • A. Passing ---destroy at the end of apian request
  • B. Running terraform destroy from the correct directory and then typing "yes" when prompted in the CLI
  • C. Using the destroy command with auto approve
  • D. Delete the state file and run terraform apply
Answer:

A

Discussions
To page 2