# Diagnosing "inconsistent result": which attribute the provider lied about

## Symptom

`Error: Provider produced inconsistent result after apply` naming a resource. The plan promised X, apply returned Y.

## Cause (one of three)

1. API normalization: the remote API changed your input (lowercased a name, trimmed whitespace, defaulted a field) and the provider did not predict it.
2. Eventual consistency: the object was still converging when the provider re-read it (common with DNS, IAM propagation, global services).
3. Provider bug: the provider's plan logic and read logic disagree about a computed attribute.

## Confirmation

1. Read the error's value diff carefully. It shows planned vs actual per attribute. Identify the exact attribute(s) that differ.
2. Run `terraform refresh`, then `terraform plan`. Clean plan means case 2: the object converged and state caught up. Done.
3. Still inconsistent on re-apply: check whether the differing attribute is one the API normalizes (compare with the console: is the real value the normalized form?). Normalization means case 1.
4. Neither: case 3, provider bug. Note the provider version.

## Fix

1. Case 2: nothing to fix. The refresh loop is the fix.
2. Case 1: set the config to the normalized value (lowercase the name yourself) so plan and reality agree, or add a scoped `ignore_changes` with a comment explaining the normalization.
3. Case 3: pin the provider to the last good version, file the bug with the plan/apply output, and track the fixed release.

## Verification

1. `terraform plan` clean after refresh, twice in a row. One clean plan can be luck; two is convergence.
2. For case 1, the config now matches the normalized real value: future plans stay clean without ignore_changes if possible.
