Prompt

Why is my Terraform plan showing changes every time?

Technology / Cloud Infrastructure1 observationLast seen Oct 25, 2026

Latest observation

Oct 25, 2026OpenAI APIWeb search: off

Terraform usually shows changes every run when the real infrastructure state differs from what Terraform thinks it should be, or when Terraform can’t keep a stable view of some values. Common causes:

1) Non-deterministic values in configuration

If you use functions like:

  • timestamp()
  • uuid()
  • random_* resources without stable state
  • file() contents that change
  • templatefile() with changing inputs

Terraform may see a new value every plan.

2) Provider is returning different values each refresh

Some providers compute or normalize fields differently on every read, causing “drift” even when nothing changed. Common examples:

  • ordering of lists/maps changes
  • API returns default values Terraform didn’t set
  • fields are rounded or reformatted
  • server-side generated attributes differ slightly

3) Drift in real infrastructure

Someone or something changed resources outside Terraform:

  • manual console edits
  • CI/CD or scripts
  • autoscaling systems
  • cloud provider defaults changing after creation

Terraform refresh detects that and plans to “fix” it.

4) Sensitive ordering issues

If you use list where the provider/API treats it as a set, Terraform may keep reordering items. Examples:

  • security group rules
  • IAM policies
  • tags/labels in some providers

5) Computed/defaulted attributes

Some provider attributes are:

  • optional but computed
  • assigned defaults by the API
  • updated by the provider after creation

If your config doesn’t match the normalized value exactly, Terraform may keep planning updates.

6) Floating-point or formatting differences

Tiny differences can trigger changes:

  • numbers stored as strings vs numbers
  • JSON/YAML formatting changes
  • whitespace or newline differences in user data, scripts, or policy documents

7) State issues

If the state is stale, corrupted, or not shared properly:

  • local state used by multiple users
  • backend lock issues
  • state not updated after failed apply

Terraform can think it needs to change resources repeatedly.


How to diagnose

  1. Run:

    terraform plan
    

    Look for which attributes keep changing.

  2. Compare with:

    terraform state show <resource>
    

    to see what Terraform currently believes.

  3. Check whether the change is:

    • in config
    • in provider-returned values
    • actual drift in cloud resources
  4. If needed, inspect with:

    terraform plan -out=tfplan
    terraform show -json tfplan
    

    to identify the exact field causing diffs.


Common fixes

  • Make inputs deterministic
  • Sort lists before passing them
  • Use toset() when order doesn’t matter
  • Avoid using timestamp()/uuid() in resource arguments
  • Align config with provider defaults
  • Upgrade provider versions
  • Add lifecycle { ignore_changes = [...] } only when appropriate
  • Re-import or refresh state if it’s out of sync

If you want, paste the relevant part of your plan output and the resource config, and I can help pinpoint the exact cause.

Brands

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.