Cloud configuration drift detection: combine change history with baseline checks
Cloud configuration drift exists when the actual state of a resource differs from the configuration that a team approved or declared in code. Good detection combines change history, which answers “what changed and when?”, with a comparison of current state against an expected baseline. A change alert alone cannot say whether a change violates the baseline, and an infrastructure-as-code (IaC) comparison cannot guarantee that every resource and property was checked.
Cloud configuration drift detection: combine change history with baseline checks
Cloud configuration drift exists when the actual state of a resource differs from the configuration that a team approved or declared in code. Good detection combines change history, which answers “what changed and when?”, with a comparison of current state against an expected baseline. A change alert alone cannot say whether a change violates the baseline, and an infrastructure-as-code (IaC) comparison cannot guarantee that every resource and property was checked.
This guide focuses on choosing detection signals for resource metadata, configuration history, and IaC comparison in AWS, Azure, and Google Cloud. It does not repeat landing-zone baseline governance or Terraform drift remediation. Official provider documentation was reviewed on November 22, 2026; no cloud account was configured or tested.
What should drift detection tell you?
At minimum, answer three questions: what resource changed, including account/subscription/project and old/new properties; when and by whom or by what path, using time and available actor/client data; and whether it departed from an approved baseline. A change event records a fact; it does not decide whether the change was authorized. A policy evaluation checks explicit rules, but it does not necessarily compare all state with code.
Keep three concepts separate: a change occurred, the resource drifted from its baseline, and the resource violated a policy. An approved deployment also creates a change event. An approved temporary exception may differ from code. Conversely, an existing violation that does not change may not trigger a change-only alert.
What detection methods exist, and what do they miss?
| Method | Question answered | Typical blind spot |
|---|---|---|
| Change events/history | What metadata change was recorded? | Coverage depends on supported resources/properties; delivery can be delayed and history short. An event does not establish approval. |
| Current inventory/snapshots | What resources and settings exist now? | Without periodic snapshots, it may be hard to reconstruct when an intermediate state existed. Out-of-scope assets are absent. |
| IaC expected-vs-actual comparison | Do supported resources differ from declared settings? | Unmanaged resources, unsupported properties, and defaults omitted from the template may not be compared. IN_SYNC does not prove complete coverage. |
| Policy/compliance evaluation | Does current configuration satisfy a defined rule? | Differences not expressed by a rule remain invisible; passing a rule does not mean code and reality match. Evaluation may be asynchronous. |
Use these signals together: events provide fast investigation clues; scheduled inventory or IaC comparisons can reveal gaps; policy checks answer whether explicit safeguards are met.
What should you check in each cloud?
| Provider feature | Detection information | Important limits |
|---|---|---|
| AWS Config | Records configuration items and history for selected supported resource types and evaluates Config rules. Change notifications are typically delivered within minutes, but recording is best effort; S3 history files are delivered every six hours per resource type. | Check resource and Region coverage. History starts when recording is enabled; do not assume it backfills earlier state. Rule compliance is different from IaC comparison. |
| AWS CloudFormation drift detection | Compares explicitly declared template/parameter values with actual properties for supported resources. | Unsupported resources may be NOT_CHECKED; omitted defaults are not compared. Nested stacks are not all checked automatically by a parent scan. |
| Azure Resource Graph Change Analysis | Queries Azure Resource Manager control-plane changes, including time, change type, property differences, and available actor/client details. Records should be available in under five minutes. | It does not observe data-plane changes such as writing rows to a storage table. Changes are queryable for 14 days; some property changes may be absent, for example when new API properties are introduced. |
| Google Cloud Asset Inventory | Pub/Sub feeds can report supported resource and policy metadata changes; asset create/update/delete history is kept for up to 35 days. | A feed covers metadata changes, not object contents: uploading a file into a Cloud Storage bucket is not an asset metadata change. Inventory is not designed for real-time enforcement. Creating or changing a feed can take up to 10 minutes to take effect. |
These are documentation snapshots, not delivery guarantees. Monitor collection gaps and delays, and add another log, inventory, or policy check where the risk requires it.
How would you interpret one change?
Hypothetical example: during incident response, an operator changes a firewall rule on a virtual network managed with IaC. A change feed reports the actor and property difference. First compare it with the incident ticket and deployment record. If it is an approved temporary exception, record its owner and expiry. If the team adopts it as the new standard, update IaC. If it exposed a service without approval, have the responsible security owner assess impact and recovery.
The event reports what changed; it does not determine whether the action was safe or approved. IaC comparison may show the difference but cannot infer operational context.
How can you inspect recent Azure changes read-only?
The Azure Resource Graph query below lists changes from the last day. It requires Azure CLI sign-in plus the Resource Graph extension (or the PowerShell module) and read access to the selected subscription or management-group scope. The query does not write to the account.
resourcechanges
| extend changeTime = todatetime(properties.changeAttributes.timestamp)
| where changeTime > ago(1d)
| project changeTime,
changeType = properties.changeType,
resourceId = properties.targetResourceId,
resourceType = properties.targetResourceType,
changes = properties.changes,
changedBy = properties.changeAttributes.changedBy,
clientType = properties.changeAttributes.clientType
| order by changeTime desc
| limit 100An empty result does not prove that nothing changed. Check the selected scope and time window, permissions, supported resource types, and 14-day retention. changedBy or clientType may be Unknown or Unspecified; correlate them with deployment records or approval tickets. Microsoft says change records should appear in under five minutes, while some detailed properties may appear later.
How should you design a detection system?
Define the expected baseline and its owner, including who can approve exceptions.
Inventory accounts, subscriptions, projects, Regions, resource types, and whether data-plane state is in scope; compare this list with provider coverage and recording settings.
Use change events for investigation alerts, scheduled inventory or IaC comparisons for reconciliation, and policy evaluation for explicit rule violations.
Correlate resource IDs and timestamps with deployments, work tickets, and actor details; plan for missing identity information.
Set retention deliberately and export history when provider defaults are too short. Monitor failures to deliver events as well as the events themselves.
Validate in a non-production environment using an approved sample change. Confirm what each signal shows and test gaps such as unsupported properties, delay, insufficient permissions, or stopped collection before enabling production response.
Judge quality by whether you know which assets and properties are covered, can detect collection gaps, and can connect a change to its approval context—not by alert volume. Confirm ownership and authorization before any automatic remediation.
Official documentation
[How AWS Config works](https://docs.aws.amazon.com/config/latest/developerguide/how-does-config-work.html)
[AWS CloudFormation drift detection and limitations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html)
[Azure Resource Graph Change Analysis: scope and retention](https://learn.microsoft.com/en-us/azure/governance/resource-graph/changes/resource-graph-changes)
[Querying Azure resource changes](https://learn.microsoft.com/en-us/azure/governance/resource-graph/changes/get-resource-changes)
[Google Cloud Asset Inventory overview and history](https://docs.cloud.google.com/asset-inventory/docs/asset-inventory-overview)
[Google Cloud Asset Inventory Pub/Sub change feeds](https://docs.cloud.google.com/asset-inventory/docs/monitor-asset-changes)
Provider behavior and retention statements reflect official documentation checked November 22, 2026 and may change. The query and procedures are documentation-based examples; they were not run against a cloud account.