pulumi/pulumi · error
property %q: %w
Error message
property %q: %w
What it means
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.
Source
Thrown at pkg/pcl/runtime/convert.go:421
func applySchemaInputsInner(
inputs resource.PropertyMap, properties []*schema.Property, insideSecret bool,
) (resource.PropertyMap, error) {
converted := make(resource.PropertyMap, len(inputs))
seen := make(map[resource.PropertyKey]struct{}, len(properties))
for _, prop := range properties {
key := resource.PropertyKey(prop.Name)
seen[key] = struct{}{}
// Anything nested below a secret-marked property is itself "inside a secret".
nestedInsideSecret := insideSecret || prop.Secret
var val resource.PropertyValue
if input, hasInput := inputs[key]; hasInput {
v, err := applySchemaInputConversion(input, prop.Type, nestedInsideSecret)
if err != nil {
return nil, fmt.Errorf("property %q: %w", key, err)
}
val = v
} else if prop.DefaultValue != nil {
val = resource.NewPropertyValue(prop.DefaultValue.Value)
} else {
continue
}
// Only add a fresh secret marker at the outermost level — once inside a secret,
// schema-driven marks would just duplicate the outer wrap.
if !insideSecret && prop.Secret && !val.IsSecret() {
val = resource.MakeSecret(val)
}
converted[key] = val
}
for key, value := range inputs {
if _, ok := seen[key]; !ok {View on GitHub (pinned to 793f7b2e16)
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
Example fix
// before enableMonitoring = "true" // after enableMonitoring = true
Defensive patterns
Strategy: validation
Validate before calling
// validate input types against schema before conversion
for key, prop := range schema.Properties {
if v, ok := inputs[key]; ok && !matchesSchemaType(v, prop.Type) {
return fmt.Errorf("property %q does not match schema type", key)
}
} Try / catch
if err != nil {
var typeErr error
if errors.As(err, &typeErr) {
log.Printf("input conversion failed at %v", err) // message includes property path
}
return err
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- array index %d: %w
- map key %q: %w
- cannot convert to any type in union: %v
- convert call arguments: %w
- text must be a string
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/d4fbe26e0f0f37b8.
Report an issue: GitHub.