1. A developer runs `terraform destroy -target=aws_instance.web`. What is the correct understanding of this command's scope and HashiCorp's guidance around it?
- A. It destroys only `aws_instance.web` and any resources that depend on it, and is recommended as the default way to remove infrastructure in normal operation
- B. It destroys only `aws_instance.web` and resources depending on it, but HashiCorp recommends reserving targeted operations for exceptional situations (like recovering from errors) rather than routine use, since it can leave configuration and state inconsistent✓ Correct
- C. It destroys the entire configuration's resources regardless of the `-target` flag, since `destroy` always operates on the whole state
- D. It only marks the resource for destruction; a second, separate `terraform apply` is required to actually remove it
Explanation
Option B is correct. `-target` scopes the destroy operation to the named resource and anything that depends on it, but HashiCorp's own guidance is that targeted operations are intended for exceptional circumstances — such as recovering from a bad state or working around a specific error — not as a routine workflow, because repeated targeted operations can leave the overall configuration and real infrastructure out of sync with what a full plan would show. Option A is incorrect on the recommendation half — targeting is explicitly discouraged as a default practice. Option C is incorrect — `-target` does scope the operation; it does not destroy everything regardless. Option D is incorrect — `terraform destroy` (targeted or not) performs the destruction directly; it doesn't require a follow-up `apply` to complete the action.