Process Flow - Prevent_destroy lifecycle rule
Define resource with prevent_destroy
Terraform plan detects destroy
Check lifecycle.prevent_destroy
Block destroy
Error message
Terraform checks if a resource marked with prevent_destroy is about to be destroyed. If yes, it blocks the action and shows an error.