Free TA-002-P Exam Braindumps

Pass your HashiCorp Certified: Terraform Associate exam with these free Questions and Answers

Page 16 of 19
QUESTION 71

- (Exam Topic 4)
Which of the following terraform subcommands could be used to remove the lock on the state for the current configuration?

  1. A. Unlock
  2. B. force-unlock
  3. C. Removing the lock on a state file is not possible
  4. D. state-unlock

Correct Answer: B

https://www.terraform.io/docs/commands/force-unlock.html

QUESTION 72

- (Exam Topic 4)
Module version is required to reference a module on the Terraform Module Registry.

  1. A. True
  2. B. False

Correct Answer: B

QUESTION 73

- (Exam Topic 4)
What resource dependency information is stored in Terraform's state?

  1. A. Only implicit dependencies are stored in state.
  2. B. Both implicit and explicit dependencies are stored in state.
  3. C. Only explicit dependencies are stored in state.
  4. D. No dependency information is stored in state.

Correct Answer: B
Terraform state captures all dependency information, both implicit and explicit. One purpose for state is to determine the proper order to destroy resources. When resources are created all of their dependency information is stored in the state. If you destroy a resource with dependencies, Terraform can still determine
the correct destroy order for all other resources because the dependencies are stored in the state. https://www.terraform.io/docs/state/purpose.html#metadata

QUESTION 74

- (Exam Topic 4)
You have a Terraform configuration that defines a single virtual machine with no references to it. You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen when you run terraform apply in the working directory again?

  1. A. Nothing
  2. B. Terraform will destroy the virtual machine
  3. C. Terraform will error
  4. D. Terraform will remove the virtual machine from the state file, but the resource will still exist

Correct Answer: B
If you remove the resource from your config file and the resource is in your state file, terraform will apply the configuration in the config file - which is to delete the resource

QUESTION 75

- (Exam Topic 4)
Given the Terraform configuration below, in which order will the resources be created?

  1. A. Larger image
  2. B. resources will be created simultaneously
  3. C. aws_eip will be created first aws_instance will be created second
  4. D. aws_instance will be created first aws_eip will be created second

Correct Answer: D
The aws_instance will be created first, and then aws_eip will be created second due to the aws_eip's resource dependency of the aws_instance id

Page 16 of 19

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