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
...
Log in to ExamTopics
Sign in:
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.
heeloco
1 year, 2 months agoPete987
1 year, 3 months ago