A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?
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
Arlene
4 days agoGeraldo
9 days agoBonita
14 days agoOctavio
19 days agoMireya
24 days agoVan
29 days agoLemuel
1 month agoCarmen
1 month agoBerry
1 month agoAudry
2 months ago