Control: RDS DB instances should have deletion protection enabled
Description
Ensure AWS Relational Database Service (AWS RDS) instances have deletion protection enabled.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.rds_db_instance_deletion_protection_enabledSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.rds_db_instance_deletion_protection_enabled --shareSQL
This control uses a named query:
select  arn as resource,  case    when engine like any(array['aurora%', 'docdb', 'neptune']) then 'skip'    when deletion_protection then 'ok'    else 'alarm'  end status,  case    when engine like any(array['aurora%', 'docdb', 'neptune']) then title || ' has engine ' || engine || ' cluster, deletion protection is set at cluster level.'    when deletion_protection then title || ' deletion protection enabled.'    else title || ' deletion protection not enabled.'  end reason    , region, account_idfrom  aws_rds_db_instance;