Free plan Signups are open now. The full audytx engine — Terraform and CloudFormation — is live. The Free plan is 100 scans a month and stays free — paid tiers arrive Nov 01, 2026 from $20/month for unlimited repositories. Try it on your own code.

Stateful resource has no prevent-destroy guard

AWS_OPS_067 MEDIUM Reliability

What it checks

Stateful resource has no prevent-destroy guard

Where it applies

Terraform: aws_db_instance, aws_rds_cluster, aws_s3_bucket, aws_dynamodb_table, aws_cognito_user_pool

CloudFormation: AWS::Cognito::UserPool, AWS::DynamoDB::Table, AWS::RDS::DBInstance, AWS::RDS::DBCluster, AWS::S3::Bucket

How to fix it

  1. Add lifecycle { prevent_destroy = true } to the resource. Terraform then rejects any plan that would destroy it while the block stays in the configuration. Removing the resource block removes this setting with it, so it does not protect against deleting the block.

Frameworks

These mappings are advisory, not an attestation of compliance.

Vendor documentation

All rules