Interview Prep/Terraform/CI/CD and Automation

What do you do when an apply fails halfway in the pipeline?

AdvancedProductionCI/CD and Automation
Answer

Do not panic and do not re-run blindly. Read the error and the partial result: Terraform already recorded what it created. Check the lock was released, fix the cause (permissions, quota, name collision, API error) and re-run the same plan or a fresh plan after review. If the lock is stuck, force-unlock after confirming the process died. Never state rm to "make it go green".

All Terraform questions Roadmap: Terraform in production

More on CI/CD and Automation