AWS Builder Center
Your Terraform Plan Is Clean. Is Your AWS Account?

Your Terraform Plan Is Clean. Is Your AWS Account?

Your infrastructure code may be correct while your actual AWS environment silently changes. Here's why drift detection matters.

Cloud & DevOps Engineer
Imagine this:
You deploy your infrastructure using Terraform. Everything looks perfect. Your plan shows no changes.
But someone has manually modified an EC2 security group in the AWS Console.
Now your Terraform code and your actual AWS environment tell two different stories.
This is called infrastructure drift.
And it can create serious problems:
  • Unexpected security exposure
  • Configuration inconsistencies
  • Failed deployments
  • Difficult production troubleshooting
  • Infrastructure that nobody fully understands
So how do we catch it?
A practical AWS approach:
  1. Use Terraform plan to identify differences between declared configuration and Terraform state.
  1. Use AWS Config to monitor resource configuration changes.
  1. Use CloudTrail to investigate who changed what and when.
  1. Automate alerts when critical resources are modified outside approved workflows.
  1. Review and reconcile drift before applying changes.
Here's something worth thinking about:
** Infrastructure as Code doesn't guarantee infrastructure consistency. Continuous verification does. **
My question to AWS builders:
If someone changes a production security group directly through the AWS Console, how quickly would your team discover it?
Would love to hear your real-world approaches!
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article