# 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.