Interview Prep/Terraform/Workflow and CLI

What happens if `terraform apply` fails halfway?

AdvancedConceptWorkflow and CLI
Answer

There is no rollback. Resources that succeeded stay created and are recorded in state; failed ones are not (or are marked tainted if creation partly succeeded). Re-running apply continues from where it stopped. If the state backend itself fails to save, Terraform writes errored.tfstate locally; recover it with terraform state push errored.tfstate.

All Terraform questions Roadmap: Terraform

More on Workflow and CLI