require-deletion-protection
Warn when a curated stateful Terraform resource lacks a proven provider-native deletion guard or literal lifecycle destroy guard.
Why
Stateful services can lose durable production data when an accidental Terraform change or destroy is allowed to delete the backing resource.
Fix
Use the exact provider guard supported by that resource. Where none exists, consider lifecycle { prevent_destroy = true }, which no longer protects the resource after its block is removed.
Examples
resource "google_sql_database" "app" { name = "app" instance = google_sql_database_instance.main.name}resource "google_sql_database" "app" { name = "app" instance = google_sql_database_instance.main.name deletion_policy = "PREVENT"}