Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 279 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 279
Topic #: 1
[All Terraform Associate Questions]

A senior admin accidentally deleted some of your cloud instances. What does Terraform do when you run terraform apply?

  • A. Build a completely brand new set of infrastructure
  • B. Tear down the entire workspace infrastructure and rebuild it
  • C. Rebuild only the instances that were deleted
  • D. Stop and generate an error message about the missing instances
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
heeloco
1 year, 2 months ago
Selected Answer: C
agree Pete987
upvoted 1 times
...
Pete987
1 year, 3 months ago
C. Rebuild only the instances that were deleted When you run terraform apply after some instances have been accidentally deleted by a senior admin, Terraform will detect the differences between your desired configuration (defined in your Terraform files) and the actual state of your cloud infrastructure (as recorded in the Terraform state file). It will then take the necessary actions to reconcile the two. In this case, Terraform will identify that the instances were deleted and no longer exist in the state file. It will then create new instances to match the desired configuration, effectively rebuilding only the instances that were deleted. This approach is one of the key benefits of using Terraform: it helps maintain the desired infrastructure state even when changes occur outside of Terraform's control.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...