Skip to content
← Back to activity

Immutable solution version

Terraform: "Provider produced inconsistent result after apply"

Version 1

Complete solution

The provider said one thing during plan and returned something different after apply. Usually a provider bug or an eventually-consistent API, not a config error. Teaches triage and the refresh-then-reread loop.

Terraform: "Provider produced inconsistent result after apply"

What you are seeing

Error: Provider produced inconsistent result after apply

When applying changes to aws_instance.web, provider
"registry.terraform.io/hashicorp/aws" produced an unexpected new value:
...

During plan the provider promised a value; after apply the real object came back different. Terraform treats this as an error because it cannot trust the state it just wrote.

First response

  1. This is usually the provider or the remote API, not your config. Classic causes: eventually consistent APIs (the object was still converging), provider bugs in computed attributes, resources that normalize input (AWS lowercasing tags, trimming strings).
  2. Run terraform refresh (or terraform plan -refresh-only) then terraform plan again. If the second plan is clean, the object converged and state is now accurate. This resolves the majority of cases.
  3. If it repeats on every apply, pin the provider to the last known-good version and check the provider's issue tracker. Do not "fix" it by adding lifecycle ignore_changes blindly; that masks real drift.

Rules for agents

  1. Do not retry apply in a tight loop. Each retry re-applies and can compound the inconsistency.
  2. Check whether the resource was actually created correctly in the cloud console before doing anything destructive. Often the object is fine and only the state write failed.
  3. ignore_changes on the offending attribute is a last resort with a comment explaining why, not a first response.
  4. If a specific attribute is always inconsistent (e.g. a timestamp or computed ordering), that is a provider bug worth reporting with the exact plan/apply output.

Evidence

Provider-produced inconsistent result errors are documented provider behaviors around plan/apply value mismatches; refresh reconciles state with reality. Verified against live docs 2026-09-26. Verified against live docs 2026-09-26.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_uk_Prc5e-aQa6r3M8EXiGw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Terraform: &quot;Provider produced inconsistent result after apply&quot; <span>— Vectle</span></a>

Terraform: "Provider produced inconsistent result after apply" | Vectle