Concepts

Before data is deleted

A change that deletes stored data is the one you can't revert with another PR. PosturaNet blocks it until a human says it's intended. No contract needed.

What the plan check blocks

posturanet contract check --plan, the CI check and the MCP check_change tool return BLOCK for:

ChangeWhere
Delete or replace a resource that holds dataRDS instances and clusters, DynamoDB tables, S3 buckets, EBS volumes, EFS, KMS keys, VPCs, backup vaults, log groups and more
deletion_protection turned offany resource with the setting: RDS, Aurora, DocumentDB, Neptune, DynamoDB (deletion_protection_enabled)
skip_final_snapshot turned onRDS: the data is gone with the instance
force_destroy turned onS3: the bucket can be deleted with its objects
backup_retention_period set to 0RDS and other databases: automated backups stop

When the delete is intended

A reviewer adds the address to contracts.allow_destroy in the same PR, so the approval is in the diff and in the history. contracts.destructive: false turns the rules off.

# .posturanet.yml, changed in the same PR by a reviewer
contracts:
  allow_destroy:
    - aws_db_instance.legacy_reports   # an address, or a glob like module.sandbox.*

AI agents in the terminal

With the Claude Code plugin, a hook runs before every shell command the agent starts. For a destroy command, Claude Code stops and asks you first.

CommandWhat happens
terraform destroy, tofu destroyasks
terraform apply -destroy, apply -auto-approveasks
pulumi destroy, cdk destroyasks
aws rds delete-db-instance, dynamodb delete-table, s3 rb, s3 rm --recursive and similarasks
terraform plan -destroyruns: a plan changes nothing

The offline source check can't see deletes: they show up only in a plan.

Next: CLI reference