{"record":{"id":"d4fbe26e0f0f37b8","repo":"pulumi/pulumi","slug":"property-q-w","errorCode":null,"errorMessage":"property %q: %w","messagePattern":"property %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/pcl/runtime/convert.go","lineNumber":421,"sourceCode":"\nfunc applySchemaInputsInner(\n\tinputs resource.PropertyMap, properties []*schema.Property, insideSecret bool,\n) (resource.PropertyMap, error) {\n\tconverted := make(resource.PropertyMap, len(inputs))\n\tseen := make(map[resource.PropertyKey]struct{}, len(properties))\n\n\tfor _, prop := range properties {\n\t\tkey := resource.PropertyKey(prop.Name)\n\t\tseen[key] = struct{}{}\n\n\t\t// Anything nested below a secret-marked property is itself \"inside a secret\".\n\t\tnestedInsideSecret := insideSecret || prop.Secret\n\n\t\tvar val resource.PropertyValue\n\t\tif input, hasInput := inputs[key]; hasInput {\n\t\t\tv, err := applySchemaInputConversion(input, prop.Type, nestedInsideSecret)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"property %q: %w\", key, err)\n\t\t\t}\n\t\t\tval = v\n\t\t} else if prop.DefaultValue != nil {\n\t\t\tval = resource.NewPropertyValue(prop.DefaultValue.Value)\n\t\t} else {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Only add a fresh secret marker at the outermost level — once inside a secret,\n\t\t// schema-driven marks would just duplicate the outer wrap.\n\t\tif !insideSecret && prop.Secret && !val.IsSecret() {\n\t\t\tval = resource.MakeSecret(val)\n\t\t}\n\t\tconverted[key] = val\n\t}\n\n\tfor key, value := range inputs {\n\t\tif _, ok := seen[key]; !ok {","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/pcl/runtime/convert.go#L403-L439","documentation":"During schema-driven input conversion (applySchemaInputConversion) in convert.go, each object property is converted to its declared schema type. When converting a property's value fails, the error is wrapped with `property %q: %w` so the offending property key is identified; it accumulates context as the error propagates up through nested conversions.","triggerScenarios":"A resource input value does not match the schema property type — e.g. passing a string where the schema declares a number/bool, an element of an object failing array/map element conversion, or an invalid enum/union member — while converting evaluated PCL inputs to schema types.","commonSituations":"Typos in config types (string \"true\" vs boolean), wrong nesting of object inputs, numbers given as quoted strings, union-typed properties whose value matches none of the member types.","solutions":["Fix the value at the reported property path to match the schema-declared type","Check nested messages (array index / map key wrappers) to locate the exact element","Consult the provider schema for the property's expected type and adjust the PCL program accordingly"],"exampleFix":"// before\nenableMonitoring = \"true\"\n// after\nenableMonitoring = true","handlingStrategy":"validation","validationCode":"// validate input types against schema before conversion\nfor key, prop := range schema.Properties {\n    if v, ok := inputs[key]; ok && !matchesSchemaType(v, prop.Type) {\n        return fmt.Errorf(\"property %q does not match schema type\", key)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err != nil {\n    var typeErr error\n    if errors.As(err, &typeErr) {\n        log.Printf(\"input conversion failed at %v\", err) // message includes property path\n    }\n    return err\n}","preventionTips":["Match literal types to schema types (no quoted booleans/numbers)","Read the provider schema before writing object-typed inputs","Fix nested path hints (array index/map key) bottom-up when debugging"],"tags":["pcl","schema","type-mismatch"],"backgroundTag":"schema-validation-failed","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}