Detailed Explanation:
Rationale for Correct Answer:
A is correct because Terraform may replace (destroy and recreate) resources when changes cannot be applied in-place. This behavior depends on the provider and resource type (e.g., immutable infrastructure changes).
B is correct because terraform apply operates on the configuration in the current working directory and uses the currently selected workspace, which determines the state being modified.
Analysis of Incorrect Options (Distractors):
C. You must pass the output of a terraform plan command to it. Incorrect because passing a saved plan file is optional. Running terraform apply without a plan will generate and apply a plan automatically.
D. By default, it does not refresh your state file. Incorrect because Terraform does refresh state by default before applying changes (unless explicitly disabled).
E. You cannot target specific resources. Incorrect because you can use the -target flag to apply changes to specific resources.
Key Concept:Behavior of terraform apply, including execution scope, state refresh, and resource lifecycle (create/update/replace).
Submit