ignore_changes and Shared Ownership
Scenario: An autoscaler adjusts capacity every minute, and Terraform repeatedly plans to restore the configured number.
ignore_changes tells Terraform to consider an argument at creation but disregard later differences for updates. It can model a field intentionally owned by another controller. It also hides drift, so ignore the narrowest attribute and document the external owner. Avoid all except during carefully bounded transitions.
Analogy: Two pilots cannot fight over one control. Assign the autoscaler the throttle while Terraform still owns the aircraft.
A worked configuration
lifecycle {
ignore_changes = [desired_capacity]
}
Every ignored field becomes invisible to normal reconciliation and may conceal security or cost changes. Audit it independently and periodically revisit whether shared ownership is still justified.
Note: Treat the plan as a change contract: understand every create, update, replacement, and destroy before approving it.
Goal: Reinforce this lesson in the tf-lifecycle-safety Terraform lab. Open/labs/terraformand choose slugtf-lifecycle-safety; the lab runs real Terraform against the offline FakeCloud provider.