Interview Prep/Terraform/CI/CD and Automation

How do you roll back a bad Terraform change?

AdvancedProductionCI/CD and Automation
Answer

Terraform has no rollback; you roll forward with a code revert. git revert the commit, review the plan (it should undo the change), apply. Some changes cannot be undone: deleted databases or replaced stateful resources need restore from snapshot or backup. This is why we gate destructive actions, enable deletion protection and review replacements carefully.

All Terraform questions Roadmap: Terraform in production

More on CI/CD and Automation