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.”
New to drift? Read this first: it clears up the most common mix-up.
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.terraform plan stayed silent: nothing was hidden, Terraform simply never tracked them.ignore_changes only mutes that second case.
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.
terraform applyNo changes. Your infrastructure matches the configuration.
provisioningState: Succeeded) and created three real child resources. Then we re-ran the platform plan:# app team deployed: appteam-data, appteam-db/orders, appteam-project No changes. Your infrastructure matches the configuration.
azurerm_storage_account’s managed schema. We added one out-of-band with az resource tag, then re-ran the plan:# 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.
ignore_changeslifecycle { ignore_changes = [tags] } and re-ran the same plan:No changes. Your infrastructure matches the configuration.
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.| App-team resource | Exists in Azure? | In Terraform state? | Caused drift? |
|---|---|---|---|
| blob container · appteam-data | ✓ yes | ✗ no | No |
| cosmos database · appteam-db | ✓ yes | ✗ no | No |
| cosmos container · orders | ✓ yes | ✗ no | No |
| foundry project · appteam-project | ✓ yes | ✗ no | No |
| tag · AddedByAppTeam (on storage) | ✓ yes | managed attribute | Yes ⚠️ |
$ 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.
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.
What this means for a platform / app-team split:
ignore_changes to deliberately cede shared fields (usually tags) without generating false alarms.