{"record":{"id":"2e2bbae41883e16e","repo":"hashicorp/terraform","slug":"no-resource-identity-schema-found-for-s-in-provi","errorCode":null,"errorMessage":"no resource identity schema found for %s (in provider %s)","messagePattern":"no resource identity schema found for (.+?) \\(in provider (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/command/jsonstate/state.go","lineNumber":437,"sourceCode":"\t\t\tif ri.Current != nil {\n\t\t\t\tif schema.Version != int64(ri.Current.SchemaVersion) {\n\t\t\t\t\treturn nil, fmt.Errorf(\"schema version %d for %s in state does not match version %d from the provider\", ri.Current.SchemaVersion, resAddr, schema.Version)\n\t\t\t\t}\n\n\t\t\t\tcurrent.SchemaVersion = ri.Current.SchemaVersion\n\n\t\t\t\tif schema.Body == nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"no schema found for %s (in provider %s)\", resAddr.String(), r.ProviderConfig.Provider)\n\t\t\t\t}\n\n\t\t\t\t// Check if we have an identity in the state\n\t\t\t\tif ri.Current.IdentityJSON != nil {\n\t\t\t\t\tif schema.IdentityVersion != int64(ri.Current.IdentitySchemaVersion) {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"resource identity schema version %d for %s in state does not match version %d from the provider\", ri.Current.IdentitySchemaVersion, resAddr, schema.IdentityVersion)\n\t\t\t\t\t}\n\n\t\t\t\t\tif schema.Identity == nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"no resource identity schema found for %s (in provider %s)\", resAddr.String(), r.ProviderConfig.Provider)\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrent.IdentitySchemaVersion = &ri.Current.IdentitySchemaVersion\n\t\t\t\t}\n\n\t\t\t\triObj, err := ri.Current.Decode(schema)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tvar value cty.Value\n\t\t\t\tvar sensitivePaths []cty.Path\n\t\t\t\tvalue, current.AttributeValues, sensitivePaths, err = marshalAttributeValues(riObj.Value)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"preparing attribute values for %s: %w\", current.Address, err)\n\t\t\t\t}\n\t\t\t\tsensitivePaths = append(sensitivePaths, schema.Body.SensitivePaths(value, nil)...)\n\t\t\t\ts := SensitiveAsBool(marks.MarkPaths(value, marks.Sensitive, sensitivePaths))","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/command/jsonstate/state.go#L419-L455","documentation":"Thrown by jsonstate when identity JSON is present and its version matches, but the provider schema has no identity schema definition (schema.Identity == nil). Terraform has identity bytes to decode but no schema describing their shape, so it cannot serialize them to JSON state.","triggerScenarios":"A provider version that removed resource-identity support while the state still contains identity JSON; provider downgrade from an identity-aware version to one without identity; partial provider schema load that dropped the identity block.","commonSituations":"Downgrading a provider below the version that introduced identity for a resource; using a forked provider that lacks identity support against state produced by the upstream provider.","solutions":["Upgrade the provider to a version that defines identity for the resource.","Run `terraform init -upgrade` to rebuild the schema cache if the provider should support identity.","Remove the identity data from state (targeted refresh once the provider clears it, or `terraform state pull`/edit/`push`).","Align the configured provider source/version with the one that wrote the identity."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if ri.Current.IdentityJSON != nil && schema.Identity == nil {\n    return fmt.Errorf(\"state has identity for %s but provider %s defines no identity schema; upgrade the provider or clear identity from state\", resAddr, r.ProviderConfig.Provider)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use a provider version that defines identity for resources whose state carries identity data.","When downgrading a provider, clear identity from affected resources first.","Rebuild the schema cache with `terraform init -upgrade` after provider changes."],"tags":["terraform","json-state","identity","schema","provider","version-drift"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}