Free Terraform-Associate-003 Exam Braindumps (page: 17)

Page 17 of 45

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 you run terraform apply in the working directory again?

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

Answer(s): D

Explanation:

This is what will happen if you run terraform apply in the working directory again, after removing the resource definition from your Terraform configuration file. Terraform will detect that there is a resource in the state file that is not present in the configuration file, and will assume that you want to delete it.



You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

  1. True
  2. False

Answer(s): B

Explanation:

The execution plan for terraform apply will not be the same as the one you ran locally with terraform plan, if your teammate manually modified the infrastructure component you are working on. This is because Terraform will refresh the state file before applying any changes, and will detect any differences between the state and the real resources.



Which parameters does terraform import require? Choose two correct answers.

  1. Provider
  2. Resource ID
  3. Resource address
  4. Path

Answer(s): B,C

Explanation:

These are the parameters that terraform import requires, as they allow Terraform to identify the existing resource that you want to import into your state file, and match it with the corresponding configuration block in your files.



What does state looking accomplish?

  1. Prevent accidental Prevent accident deletion of the state file
  2. Blocks Terraform commands from modifying, the state file
  3. Copies the state file from memory to disk
  4. Encrypts any credentials stored within the state file

Answer(s): B

Explanation:

This is what state locking accomplishes, by preventing other users from modifying the state file while a Terraform operation is in progress. This prevents conflicts and data loss.



Page 17 of 45



Post your Comments and Discuss HashiCorp Terraform-Associate-003 exam with other Community members:

Marc commented on October 18, 2024
What the best way to learn terraform?
UNITED STATES
upvote

Chandra commented on October 09, 2024
This is the best and only way of passing this exam as it is extremely hard. Good questions and valid dump.
INDIA
upvote

Madhan commented on September 26, 2024
Useful questions
INDIA
upvote

Abu commented on September 22, 2024
I did not know these questions were available online. I did not believe and trust them and studied quite a lot and just used these questions for practice. But most of the questions turned out to be in the exam.
UNITED STATES
upvote

Sahin commented on July 04, 2024
Need que to learn new things
UNITED STATES
upvote