An apply that should create ten resources creates eight and then fails on the ninth with a cloud quota error. After the quota is raised, what should the engineer expect and do next?
Select an answer to reveal the explanation.
Short Explanation
Terraform doesn't undo a half-finished apply; it writes down what it did build and stops. So once you've fixed the quota, you just run it again and it picks up where it left off. The trap is expecting an automatic rollback.
Full Explanation
When Terraform encounters an error during apply, it logs the error, updates the state file with the changes it did make, unlocks the state and exits. The documentation is explicit that Terraform does not support automatically rolling back a partially completed apply; the infrastructure may be in an intermediate state, and after the cause is resolved you apply again to reach the desired state. In this case the eight successfully created resources are recorded in state, so after the quota is raised a new plan shows only the two remaining creates, plus any updates needed for resources that depend on them. Expecting a rollback misunderstands the model, and recreating all ten would be impossible without first destroying the existing eight. Successful creates are written to state during the apply, so importing them is unnecessary and would fail because the addresses are already managed. The lock is released when Terraform exits after an error, and a destroy is neither required nor desirable; it would remove infrastructure that is correct. Exam caveat: if a resource was created remotely but Terraform could not record it, for example because the process was killed, the object may need to be imported, which differs from a clean provider error. Operational check: after fixing the quota, run terraform plan, confirm it shows two additions and no unexpected replacements, and then apply.