TA-002-P Dumps

TA-002-P Free Practice Test

HashiCorp TA-002-P: HashiCorp Certified: Terraform Associate

QUESTION 106

- (Exam Topic 1)
What is the workflow for deploying new infrastructure with Terraform?

Correct Answer: D
Reference: https://www.google.com/search?q=Write+a+Terraform+configuration,+run+terraform+init,
+run+terraform+plan+to+view+planned+infrastructure+changes,+and+terraform+apply+to+create+new
+infrastructure.&oq=Write+a+Terraform+configuration,+run+terraform+init,+run+terraform+plan+to
+view+planned+infrastructure+changes,+and+terraform+apply+to+create+new
+infrastructure.&aqs=chrome..69i57.556j0j7&sourceid=chrome&ie=UTF-8

QUESTION 107

- (Exam Topic 1)
Terraform provisioners that require authentication can use the _____ block.

Correct Answer: A
https://www.terraform.io/language/resources/provisioners/connection
"Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect." "Connection blocks don't take a block label and can be nested within either a resource or a provisioner."

QUESTION 108

- (Exam Topic 3)
You also have a defined the following environment variables in your shell: TF_itemNum =6, TF_VAR_itemNum =9. You also have a terraform.tfvars file with the following contents
itemNum = 7
When you run the following apply command, what is the value assigned to the itemNum variable? terraform apply -var itemNum =4

Correct Answer: D
The -var and -var-file methods of assigning variables have the highest precedence. https://www.terraform.io/docs/configuration/variables.html

QUESTION 109

- (Exam Topic 2)
Which one of the following command will rewrite Terraform configuration files to a canonical format and style.

Correct Answer: D
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of the Terrra Terraform language style conventions, along with other minor adjustments for readability.

QUESTION 110

- (Exam Topic 1)
You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM, perform terraform apply, and see that your VM was created successfully.
What should you do to delete the newly-created VM with Terraform?

Correct Answer: B
You develop a Terraform configuration containing one VM, perform terraform apply, and see that your VM was created successfully. read the question carefully "Terraform configuration containing one VM, perform terraform apply" so only one VM is in state file.