diff --git a/provider/pkg/gen/schema.go b/provider/pkg/gen/schema.go index 1fdc38eb02..99def6acee 100644 --- a/provider/pkg/gen/schema.go +++ b/provider/pkg/gen/schema.go @@ -366,7 +366,16 @@ func PulumiSchema(swagger map[string]any, opts ...schemaGeneratorOption) pschema for _, kind := range version.Kinds() { tok := fmt.Sprintf(`kubernetes:%s:%s`, kind.apiVersion, kind.kind) var patchTok string - if !strings.HasSuffix(kind.kind, "List") { + + containsItems := false + for _, prop := range kind.Properties() { + if prop.name == "items" { + containsItems = true + break + } + } + + if !(strings.HasSuffix(kind.kind, "List") && containsItems) { patchTok = fmt.Sprintf("%sPatch", tok) }