{"record":{"id":"354eaa0d51593702","repo":"hashicorp/terraform","slug":"error-unsupported-resource-s","errorCode":null,"errorMessage":"Error: unsupported resource %s","messagePattern":"Error: unsupported resource (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/builtin/providers/terraform/provider.go","lineNumber":213,"sourceCode":"\n// ImportResourceState requests that the given resource be imported.\nfunc (p *Provider) ImportResourceState(req providers.ImportResourceStateRequest) providers.ImportResourceStateResponse {\n\tif req.TypeName == \"terraform_data\" {\n\t\treturn importDataStore(req)\n\t}\n\n\tpanic(\"unimplemented: cannot import resource type \" + req.TypeName)\n}\n\n// MoveResourceState requests that the given resource be moved.\nfunc (p *Provider) MoveResourceState(req providers.MoveResourceStateRequest) providers.MoveResourceStateResponse {\n\tswitch req.TargetTypeName {\n\tcase \"terraform_data\":\n\t\treturn moveDataStoreResourceState(req)\n\tdefault:\n\t\tvar resp providers.MoveResourceStateResponse\n\n\t\tresp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf(\"Error: unsupported resource %s\", req.TargetTypeName))\n\n\t\treturn resp\n\t}\n}\n\n// ValidateResourceConfig is used to to validate the resource configuration values.\nfunc (p *Provider) ValidateResourceConfig(req providers.ValidateResourceConfigRequest) providers.ValidateResourceConfigResponse {\n\treturn validateDataStoreResourceConfig(req)\n}\n\nfunc (p *Provider) ValidateEphemeralResourceConfig(req providers.ValidateEphemeralResourceConfigRequest) providers.ValidateEphemeralResourceConfigResponse {\n\tvar resp providers.ValidateEphemeralResourceConfigResponse\n\tresp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf(\"unsupported ephemeral resource type %q\", req.TypeName))\n\treturn resp\n}\n\n// OpenEphemeralResource implements providers.Interface.\nfunc (p *Provider) OpenEphemeralResource(req providers.OpenEphemeralResourceRequest) providers.OpenEphemeralResourceResponse {","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/builtin/providers/terraform/provider.go#L195-L231","documentation":"MoveResourceState only handles moves whose TargetTypeName is \"terraform_data\", the single managed resource this provider ships. Any other target type is rejected with a diagnostic. This guards the moved-block / state-migration path.","triggerScenarios":"A moved block whose target resolves to a type other than terraform_data under the built-in terraform provider; Core routing a MoveResourceStateRequest to this provider for an unsupported TargetTypeName.","commonSituations":"A moved block with a typo'd or wrong target address; Core address resolution pointing a state move at the built-in provider for a resource owned by an external provider; version skew where a renamed type is not yet registered.","solutions":["Confirm the target type is terraform_data (the only movable resource this provider supports)","Route the move to the external provider that owns the target type","Check the resource address and type in the moved block for typos"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before calling MoveResourceState on the built-in terraform provider:\nif req.TargetTypeName != \"terraform_data\" {\n    // route to the external provider that owns req.TargetTypeName instead\n}","typeGuard":"func isBuiltinTerraformMovableResource(name string) bool {\n    return name == \"terraform_data\"\n}","tryCatchPattern":null,"preventionTips":["Route MoveResourceState to the provider that owns the target type, not the built-in one","Double-check moved-block addresses and target types for typos before planning","In tests, assert TargetTypeName == \"terraform_data\" before invoking the built-in provider"],"tags":["terraform","go","provider","move-state","invariant"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}