{"record":{"id":"dc4e9077358fdc5b","repo":"opentofu/opentofu","slug":"invalid-text-tfplugin6-stringkind-v","errorCode":null,"errorMessage":"Invalid text tfplugin6.StringKind %v","messagePattern":"Invalid text tfplugin6\\.StringKind (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/plugin6/convert/function.go","lineNumber":32,"sourceCode":"\t\"github.com/zclconf/go-cty/cty\"\n)\n\nfunc ProtoToCtyType(in []byte) cty.Type {\n\tvar out cty.Type\n\tif err := json.Unmarshal(in, &out); err != nil {\n\t\tpanic(err)\n\t}\n\treturn out\n}\n\nfunc ProtoToTextFormatting(proto tfplugin6.StringKind) providers.TextFormatting {\n\tswitch proto {\n\tcase tfplugin6.StringKind_PLAIN:\n\t\treturn providers.TextFormattingPlain\n\tcase tfplugin6.StringKind_MARKDOWN:\n\t\treturn providers.TextFormattingMarkdown\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Invalid text tfplugin6.StringKind %v\", proto))\n\t}\n}\n\nfunc ProtoToFunctionParameterSpec(proto *tfplugin6.Function_Parameter) providers.FunctionParameterSpec {\n\treturn providers.FunctionParameterSpec{\n\t\tName:               proto.Name,\n\t\tType:               ProtoToCtyType(proto.Type),\n\t\tAllowNullValue:     proto.AllowNullValue,\n\t\tAllowUnknownValues: proto.AllowUnknownValues,\n\t\tDescription:        proto.Description,\n\t\tDescriptionFormat:  ProtoToTextFormatting(proto.DescriptionKind),\n\t}\n}\n\nfunc ProtoToFunctionSpec(proto *tfplugin6.Function) providers.FunctionSpec {\n\tparams := make([]providers.FunctionParameterSpec, len(proto.Parameters))\n\tfor i, param := range proto.Parameters {\n\t\tparams[i] = ProtoToFunctionParameterSpec(param)","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/opentofu/opentofu/blob/3561785c48c1ce615e7c50261bd351f26053efa2/internal/plugin6/convert/function.go#L14-L50","documentation":"Error \"Invalid text tfplugin6.StringKind %v\" thrown in opentofu/opentofu.","triggerScenarios":"Thrown at internal/plugin6/convert/function.go:32 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3561785c48c1ce615e7c50261bd351f26053efa2","analyzedAt":"2026-08-15T23:27:16.226Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}