{"record":{"id":"63443c5fe9bb71d1","repo":"hashicorp/terraform","slug":"the-builtin-provider-does-not-support-provider-upg","errorCode":null,"errorMessage":"The builtin provider does not support provider upgrades since it has not changed the identity schema yet.","messagePattern":"The builtin provider does not support provider upgrades since it has not changed the identity schema yet\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/builtin/providers/terraform/resource_data.go","lineNumber":109,"sourceCode":"\t}\n\treturn resp\n}\n\nfunc upgradeDataStoreResourceState(req providers.UpgradeResourceStateRequest) (resp providers.UpgradeResourceStateResponse) {\n\t// We've only added new nullable block attributes, so unmarshaling from json\n\t// will complete the data structure correctly.\n\tval, err := ctyjson.Unmarshal(req.RawStateJSON, dataStoreResourceSchema().Body.ImpliedType())\n\tif err != nil {\n\t\tresp.Diagnostics = resp.Diagnostics.Append(err)\n\t\treturn resp\n\t}\n\n\tresp.UpgradedState = val\n\treturn resp\n}\n\nfunc upgradeDataStoreResourceIdentity(providers.UpgradeResourceIdentityRequest) (resp providers.UpgradeResourceIdentityResponse) {\n\tresp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf(\"The builtin provider does not support provider upgrades since it has not changed the identity schema yet.\"))\n\treturn resp\n}\n\nfunc readDataStoreResourceState(req providers.ReadResourceRequest) (resp providers.ReadResourceResponse) {\n\tresp.NewState = req.PriorState\n\tresp.Private = req.Private\n\treturn resp\n}\n\nfunc planDataStoreResourceChange(req providers.PlanResourceChangeRequest) (resp providers.PlanResourceChangeResponse) {\n\tresp.PlannedState = req.ProposedNewState\n\n\tif req.ProposedNewState.IsNull() {\n\t\t// destroy op\n\t\treturn resp\n\t}\n\n\tplanned := req.ProposedNewState.AsValueMap()","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/builtin/providers/terraform/resource_data.go#L91-L127","documentation":"Returned by upgradeDataStoreResourceIdentity at resource_data.go:109. The builtin provider has not changed its resource-identity schema, so it deliberately rejects any UpgradeResourceIdentity request. There is no prior identity version to migrate from, so attempting an identity upgrade is treated as an error rather than a passthrough.","triggerScenarios":"Terraform Core invokes UpgradeResourceIdentityRequest for a terraform_data resource (e.g. after a provider/Core upgrade that introduced identity handling).","commonSituations":"Upgrading Terraform Core to a version that supports resource identity while state contains terraform_data resources whose identity blob is being migrated; running terraform refresh after such an upgrade.","solutions":["No action needed if the error is transient during a Core upgrade; ensure you are on a matching Terraform version where the builtin provider implements the identity schema.","If persistently hit, remove/replace the terraform_data resource or clear its identity in state with terraform state replacement.","Report as a bug if it appears on the Terraform version the builtin provider shipped with."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"// Detect the unsupported-identity-upgrade error by message prefix.\nfunc isUnsupportedIdentityUpgrade(err error) bool {\n    return err != nil && strings.Contains(err.Error(), \"does not support provider upgrades\")\n}","tryCatchPattern":"resp := upgradeDataStoreResourceIdentity(req)\nfor _, d := range resp.Diagnostics {\n    if isUnsupportedIdentityUpgrade(d) {\n        // expected on builtin provider; skip rather than abort\n        continue\n    }\n    // handle real diagnostics\n}","preventionTips":["Do not run UpgradeResourceIdentity against the builtin terraform provider.","Match Terraform Core and builtin provider versions so identity upgrades are never attempted."],"tags":["terraform","terraform-data","identity","state-migration","upgrade"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T21:17:07.882Z"}