Tested end-to-end on Azure

Where exactly does Terraform call it “drift”?

A platform team owns shared landing-zone resources in Terraform. An app team adds their own Foundry projects, Cosmos databases and blob containers out-of-band with Bicep. We deployed it for real and measured the precise line where the platform team’s pipeline starts shouting “drift.”

Region eastus2 Terraform 1.15.6 azurerm 3.117.1 azapi 2.10.0

In plain English 🗣️

New to drift? Read this first: it clears up the most common mix-up.

✓
Terraform keeps a checklist of only the things it personally created. Here that's three accounts: the storage account, the Cosmos account, and the Foundry account.
✓
When the app team adds new things inside those accounts (a blob container, a Cosmos database, a Foundry project), Terraform never sees them, because they were never on its checklist. So it says “nothing changed.” This is genuine blindness, not suppression: we did not hide anything.
!
The only time Terraform reports drift is when someone edits a setting on one of those three accounts it created, like adding a tag to the storage account. Now reality no longer matches its notes, so it flags it.
~
ignore_changes is an optional mute button for that tag case only. It tells Terraform “I'm fine with people editing the tags, stop reporting it.” It has nothing to do with the container, database, or project: those were already invisible.

● Invisible to Terraform

App team created brand-new child resources. Platform terraform plan stayed silent: nothing was hidden, Terraform simply never tracked them.
  • blob container appteam-data → in the platform storage account
  • cosmos sql database + container appteam-db / orders
  • foundry project appteam-project
The Line

● Triggers drift

Anything that changes an attribute Terraform already manages on a resource it owns.
  • tag added to the storage account tags is a managed attribute → plan wants to remove it
  • SKU / TLS / network / public-access flags any first-class managed property
  • policy flipping disableLocalAuth policy-as-code is just another out-of-band actor
Bottom line: new, independent ARM child resources are invisible to the platform state. Drift only fires when an out-of-band change touches a property Terraform records for a resource it manages, and ignore_changes only mutes that second case.

The setup we deployed

Platform team: Terraform
rg-drift-demo-•••
├─ azurerm_storage_account  stdrift•••
├─ azurerm_cosmosdb_account (serverless)
└─ azapi_resource.foundry  AIServices
App team: Bicep (out-of-band)
az deployment group create
├─ blobServices/containers appteam-data
├─ sqlDatabases[/containers] appteam-db
└─ accounts/projects  appteam-project

Drift was measured with terraform plan: the faithful local equivalent of Terraform Cloud’s drift / health-assessment runs, which compare real infrastructure against the committed configuration.

The four runs · expected vs. actual

0
Baseline: right after terraform apply
AS EXPECTED
Expected
Clean: no changes
Actual
No changes ✓
terraform plan
No changes. Your infrastructure matches the configuration.
1
App team adds a container, a database & a Foundry project
NO DRIFT
The app team’s Bicep deployment succeeded (provisioningState: Succeeded) and created three real child resources. Then we re-ran the platform plan:
Expected
No drift: children aren’t in state
Actual
No changes ✓
terraform plan  (after app-team Bicep deploy)
# app team deployed: appteam-data, appteam-db/orders, appteam-project
No changes. Your infrastructure matches the configuration.
This is the headline result: adding child resources caused zero drift in the platform workspace, and we suppressed nothing here; they're simply not in Terraform's state.
2
App team adds a tag to the storage account
DRIFT DETECTED
A tag is part of azurerm_storage_account’s managed schema. We added one out-of-band with az resource tag, then re-ran the plan:
Expected
Drift: managed attribute changed
Actual
1 to change: wants to remove the tag ⚠️
terraform plan  (after out-of-band tag)
  # azurerm_storage_account.main will be updated in-place
  ~ resource "azurerm_storage_account" "main" {
      ~ tags = {
          - "AddedByAppTeam" = "drift-test" -> null
            # (5 unchanged elements hidden)
        }
    }

Plan: 0 to add, 1 to change, 0 to destroy.
Terraform proposes to revert the tag: the unmistakable drift signal a platform pipeline would surface.
3
Platform team cedes tags with ignore_changes
DRIFT SUPPRESSED
With the tag still present in Azure, we added lifecycle { ignore_changes = [tags] } and re-ran the same plan:
Expected
No drift: tags intentionally ignored
Actual
No changes ✓
terraform plan  (with ignore_changes = [tags])
No changes. Your infrastructure matches the configuration.
The deliberate escape hatch: the platform team hands the tags field to the app team and the noise disappears. This step only affects the Run 2 tag: the container, database and project were never tracked, so it doesn't touch them.

Hard evidence: real in Azure, absent from state

App-team resourceExists in Azure?In Terraform state?Caused drift?
blob container · appteam-data✓ yes✗ noNo
cosmos database · appteam-db✓ yes✗ noNo
cosmos container · orders✓ yes✗ noNo
foundry project · appteam-project✓ yes✗ noNo
tag · AddedByAppTeam (on storage)✓ yesmanaged attributeYes ⚠️
terraform state list
$ terraform state list
azapi_resource.foundry
azurerm_cosmosdb_account.main
azurerm_resource_group.main
azurerm_storage_account.main
random_string.suffix
# 5 platform resources. Zero child resources. That is why Run 1 saw nothing.

Bonus finding: policy-as-code is an out-of-band actor too

An Azure Policy in this subscription created drift before the app team did anything.

The subscription enforces keyless auth. Right after apply, a policy flipped disableLocalAuth → true on the Foundry account and local_authentication_disabled → true on Cosmos. Because those are Terraform-managed attributes, the very first plan reported drift, exactly the same rule as the app-team tag. We aligned the config to the policy (the secure default) to get a clean baseline. Lesson: a Modify/DeployIfNotExists policy lands on the drift side of the line, just like a human with the CLI.

So… where is the line?

NO DRIFT  →  create a new, independent ARM resource under a managed parent
          (blob container · cosmos database · foundry project)

DRIFT      →  modify an attribute Terraform records on a resource it manages
          (a tag · a SKU · a TLS setting · a network rule · a policy flip)

What this means for a platform / app-team split: