My Terraform drift detector had a problem.
It could run terraform plan, detect drift, and send me an email through SNS. But the message only told me that drift existed.
It did not tell me which resources changed. It did not tell me whether the change affected IAM, networking, or something less critical.
So I changed the alert into a structured event and sent it to two places: SQS for audit processing and Lambda for severity classification.
The Stack
CodeBuild → runs terraform plan
↓
terraform show -json → extracts the changed resources
↓
SNS → publishes one structured event
↓
├── SQS → keeps the event for audit processing
└── Lambda → classifies changes as HIGH, MEDIUM, or LOW
↓
CloudWatch → stores the classification logs
Step 1: Publish Structured Drift Details
The build already save
Discussion
Leave the first comment
Be the first to leave a mark on this discussion.