{"record":{"id":"6fcd2c79ef613af4","repo":"pulumi/pulumi","slug":"marshaling-provider-inputs-w-6fcd2c","errorCode":null,"errorMessage":"marshaling provider inputs: %w","messagePattern":"marshaling provider inputs: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/go/common/resource/plugin/provider_plugin.go","lineNumber":1100,"sourceCode":"\t\t\t\terr := fmt.Errorf(\"marshaling configuration property '%v': %w\", k, err)\n\t\t\t\tp.configSource.MustReject(err)\n\t\t\t\treturn ConfigureResponse{}, err\n\t\t\t}\n\t\t\tmapped = string(marshalled)\n\t\t}\n\n\t\tvariables[string(pkg)+\":config:\"+string(k)] = mapped.(string)\n\t}\n\n\tminputs, err := MarshalProperties(req.Inputs, MarshalOptions{\n\t\tLabel:         label + \".inputs\",\n\t\tKeepUnknowns:  true,\n\t\tKeepSecrets:   true,\n\t\tKeepResources: true,\n\t\tPropagateNil:  true,\n\t})\n\tif err != nil {\n\t\terr := fmt.Errorf(\"marshaling provider inputs: %w\", err)\n\t\tp.configSource.MustReject(err)\n\t\treturn ConfigureResponse{}, err\n\t}\n\n\t// Spawn the configure to happen in parallel.  This ensures that we remain responsive elsewhere that might\n\t// want to make forward progress, even as the configure call is happening.\n\tgo func() {\n\t\tvar urn, typ, id *string\n\t\tif req.URN != nil {\n\t\t\turnVal := string(*req.URN)\n\t\t\turn = &urnVal\n\t\t}\n\t\tif req.ID != nil {\n\t\t\tidVal := string(*req.ID)\n\t\t\tid = &idVal\n\t\t}\n\t\tif req.Type != nil {\n\t\t\ttypVal := string(*req.Type)","sourceCodeStart":1082,"sourceCodeEnd":1118,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/go/common/resource/plugin/provider_plugin.go#L1082-L1118","documentation":"Before invoking the provider's Configure RPC, the whole provider input PropertyMap is marshaled to protobuf Struct form via MarshalProperties. If that marshaling fails (unsupported value kinds, assets with reject flags, invalid values), the error is wrapped as \"marshaling provider inputs\", the config source is rejected, and Configure aborts. Like 3110 it is a wrapper; the %w cause carries the real reason.","triggerScenarios":"Calling Configure on a Go provider whose req.GetArgs() property map fails MarshalProperties — e.g. a nested object value the marshaller cannot represent, an invalid secret/asset signature, or unknowns handled contrary to the KeepUnknowns/KeepSecrets options in effect.","commonSituations":"Passing hand-built PropertyMaps in tests with synthetic signatures; engine/provider version drift introducing new property kinds an older SDK cannot marshal; corrupted state producing malformed property values.","solutions":["Read the wrapped cause from %w to find the offending property and fix its value kind.","Validate the inputs PropertyMap (no exotic/unsupported signatures) before calling Configure.","Rebuild/upgrade the Go SDK and engine together so property marshaling is version-consistent.","Reduce the input to a minimal set and add properties back until the failing one is isolated."],"exampleFix":"// before: synthetic property with no valid kind\ninputs[\"weird\"] = resource.NewProperty(someUnsupportedGoValue)\n// after: use a supported property\ninputs[\"weird\"] = resource.NewProperty(\"supported-string\")","handlingStrategy":"validation","validationCode":"// Sanity-check the inputs PropertyMap before Configure\nerr := inputs.Validate(func(k resource.PropertyKey, v resource.PropertyValue) error {\n    if v.IsSecret() && !keepSecrets {\n        return fmt.Errorf(\"unexpected secret at %q\", k)\n    }\n    return nil\n})","typeGuard":"func hasExoticValues(m resource.PropertyMap) bool {\n    for _, v := range m {\n        if !(v.IsString() || v.IsNumber() || v.IsBool() || v.IsArray() || v.IsObject() || v.IsNull()) {\n            return true\n        }\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Build test PropertyMaps only from supported value kinds","Match MarshalOptions (KeepUnknowns/KeepSecrets) to the actual property content","Upgrade engine and SDK together to avoid kind mismatches"],"tags":["go","provider","configuration","serialization"],"backgroundTag":"property-marshal-failed","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}