U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Terraform-Associate-004 Exam - Topic 3 Question 13 Discussion

A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?
C) Rebuild only the instances that were deleted.
A) Tear down the entire workspace's infrastructure and rebuild it.
B) Build a completely brand new set of infrastructure.
D) Stop and generate an error message about the missing instances.

HashiCorp Terraform-Associate-004 Exam - Topic 3 Question 13 Discussion

Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 13
Topic #: 3
[All Terraform-Associate-004 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: C

Terraform detects infrastructure drift by comparing thestate filewith the actual infrastructure.

When an instance ismanually deleted, Terraformsees it as missingand marks it for recreation.

Running terraform apply willonly recreate the missing instanceswhile leaving the rest of the infrastructure unchanged.

Explanation of incorrect answers:

A (Tear down everything and rebuild)-- Incorrect. Terraform does not destroy existing infrastructure unless explicitly told to.

B (Build a completely new set of infrastructure)-- Incorrect. Terraform does not create duplicates unless configuration changes.

D (Stop and error out)-- Incorrect. Terraform does not fail; itrebuilds missing resourcesautomatically.

Official Terraform Documentation Reference:

Handling Infrastructure Drift


Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel