State Out of Sync After Failed Apply
The apply partially completed before failing. The state reflects the partial changes, but the real world is in a different state. The state is now inconsistent with the real world.
← All break/fix scenarios in Terraform
The apply partially completed before failing. The state reflects the partial changes, but the real world is in a different state. The state is now inconsistent with the real world.
1. Do not re-apply blindly. 2. Investigate the failure. 3. Refresh the state. 4. Identify what is in the state but not in the real world. 5. Manually reconcile.
The state matches the real world, the plan is empty, and the incident is documented.
1. Use refresh-only plans after apply failures. 2. Use saved-plan apply to ensure the apply matches the plan.
The apply partially completed before failing. The state reflects the partial changes, but the real world is in a different state. The state is now inconsistent with the real world.