Prompt
I need drift detection for cloud infrastructure changes
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
Sure — drift detection is the process of identifying when your actual cloud resources no longer match the desired state defined in code or configuration.
What you can use
1) Infrastructure as Code tools
If you use IaC, drift detection is usually built in or available through a provider:
-
Terraform
terraform plancompares desired vs actual stateterraform refresh/ newer workflows detect changes from the cloud- Terraform Cloud/Enterprise has drift detection for scheduled runs
-
AWS CloudFormation
- Drift detection for stacks and resources
-
Azure
- Azure Policy for compliance drift
- ARM/Bicep with deployment what-if checks
-
GCP
- Config Connector, Terraform, or asset inventory/compliance tools
2) Cloud-native configuration/compliance tools
These are useful if you want continuous monitoring:
- AWS Config
- Azure Policy / Azure Resource Graph
- Google Cloud Asset Inventory / Security Command Center
- Third-party tools:
- Checkov
- OPA / Conftest
- Prowler (AWS-focused)
- Cloud Custodian
3) Practical drift detection patterns
A solid setup usually includes:
- Scheduled scans of infrastructure state
- Policy checks for insecure or noncompliant changes
- Alerting when manual changes happen in the console
- CI/CD gate checks before applying changes
- Immutable infrastructure where possible to reduce drift
Recommended approach
If you’re already using Terraform:
- Store all infra in Git
- Run
terraform planon a schedule - Compare against the latest approved state
- Alert on any unexpected diff
- Optionally auto-remediate or require approval
If you’re on AWS and want stronger native detection:
- Enable AWS Config
- Define rules for critical resources
- Use CloudFormation drift detection where applicable
- Route findings to SNS/Slack/SIEM
Key things drift detection should catch
- Manual edits in the cloud console
- Changed security groups/firewall rules
- Modified IAM roles/policies
- Updated instance sizes or autoscaling settings
- Deleted or added resources
- Tag changes and config divergence
If you want, I can help you with one of these next:
- a Terraform drift detection setup
- an AWS-native drift detection design
- a generic architecture for multi-cloud drift detection
- a sample script or CI pipeline for drift checks