I just take another approach which is if something doesn't work, then I'm able to quickly blow it away and re-deploy without affecting the end service by having the apply only target specific environments.
The solution you mentioned relies on other tools and some manual work you need to do. Also with how TF works by default you might never be able to restore to exact same state as it was before.
CF when needs to replace a resource it first creates a new copy, and applies all changes if everything succeeds then it removes old resource, if it fails it rolls changes back.
You have an option that allows you to do that with a resource, but it's done individually per resource and it still isn't exactly the same thing.
I always found tf's lack of rollback ability, basically admitting there is no way to really rollback to the exact state, ARNs and all, so it isn't going to try.
No, CloudFormation just postpones resource deletions towards the end of stack operations to allow successful operation rollbacks. Even the default replacement strategy is creating the new resource before deleting the old resource whenever possible for this reason:
https://github.com/aws-cloudformation/aws-cloudformation-res...
On the whole terraform is much faster too.
https://docs.aws.amazon.com/serverless-application-model/lat...
We are talking here about CF and CF gives you control over it.
https://docs.aws.amazon.com/serverless-application-model/lat...