Prompt
Why are my Terraform plans changing when nothing was edited?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
Terraform plans can change even when you didn’t edit code because Terraform is comparing your configuration against real-world infrastructure state, and that state can drift or update independently.
Common reasons:
-
Provider refresh detected real changes
- A cloud service may have modified values automatically.
- Examples: timestamps, generated IDs, defaulted fields, security group rule normalization, etc.
-
External drift
- Someone or something changed the infrastructure outside Terraform.
- Could be manual console edits, another automation tool, or an operator process.
-
Computed / unstable values
- Some attributes are known only after apply and may appear to change between runs.
- Common with IDs, ordering of sets/lists, or fields that are “computed” by the provider.
-
Provider version changes
- Upgrading a provider can change how it reads or normalizes remote state, producing diffs even without config edits.
-
Terraform or provider bug
- Occasionally a provider incorrectly reports a difference, leading to a false-positive plan.
-
Data source or dynamic input changed
- Even if your
.tffiles didn’t change, environment variables, remote state, SSM/Secrets values, templates, or data sources may have changed.
- Even if your
-
State file differs from reality
- If the state is stale, incomplete, or was manipulated, Terraform may plan changes to reconcile it.
What to check:
- Run:
terraform plan terraform refresh terraform show - Compare the plan carefully to see whether diffs are:
- real configuration drift,
- ordering-only changes,
- or provider normalization.
- Check recent provider/version changes:
terraform providers - Inspect state and remote resource settings.
- If it’s a known harmless diff, you may need
lifecycle { ignore_changes = [...] }for specific fields.
If you want, paste the plan diff here and I can help identify the exact cause.