limited-rainbow-51650
03/31/2026, 10:00 AMgrafana:apps/v2beta1:Dashboard
Via resources.go, I configure the language sections with module mappings. For instance, my schema.json contains the following for `nodejs`:
"nodejs": {
...
"moduleToPackage": {
"apps/v2beta1": "apps/v2beta1"
},
...
},
The generated NodeJS SDK however has file sdk/nodejs/apps/dashboard.ts, while I expected sdk/nodejs/apps/v2beta1/dashboard.ts. What am I missing?echoing-dinner-19531
03/31/2026, 10:36 AMlimited-rainbow-51650
03/31/2026, 10:37 AMlimited-rainbow-51650
03/31/2026, 10:38 AMapps is not mapped in tks.MappedModules at the end of resources.goechoing-dinner-19531
03/31/2026, 10:39 AMlimited-rainbow-51650
03/31/2026, 10:42 AMSo I don't think a module name mapping of X => X does anything.Why not? The codegen behaves differently for
grafana:apps/dashboard:Dashboard and grafana:apps/v2beta1:Dashboard. Without mappings, both generate to grafana.apps.Dashboard (NodeJS), while I want the latter to be remapped properly. By accident, the Pulumi module name and the language package name are the same. My expectation is that it would still do its magic.echoing-dinner-19531
03/31/2026, 10:46 AM(.*)(?:/[^/]*) so it's pulling off that /dasboard or /v2beta1 before doing any further module namingechoing-dinner-19531
03/31/2026, 10:49 AMgrafana:apps/v2beta1/dashboard:Dashboardlimited-rainbow-51650
03/31/2026, 10:51 AMpulumi package gen-sdk feeding it schema.json? Asking because my schema.json contain the correct Pulumi resource types and mappings sections in the language configuration sections.echoing-dinner-19531
03/31/2026, 10:55 AMlimited-rainbow-51650
03/31/2026, 10:57 AMgrafana:apps/v2beta1:Dashboard as the resource type.echoing-dinner-19531
03/31/2026, 11:03 AMlimited-rainbow-51650
03/31/2026, 11:13 AM"policy/v1": "policy/v1", ?
https://raw.githubusercontent.com/pulumi/pulumi-kubernetes/refs/heads/master/provider/cmd/pulumi-resource-kubernetes/schema.json
My understanding of SDK generation has been so far that one needs to get the proper information into schema.json , usually done by the gen specific command (pulumi-gen-kubernetes, pulumi-tfgen-grafana). Once at that point, actual SDK generation is triggered via pulumi package gen-sdk . Is there still something specific to SDK generation which is different in these gen commands?echoing-dinner-19531
03/31/2026, 11:33 AMlimited-rainbow-51650
03/31/2026, 11:48 AMgrafana:<http://apps.grafana.com/v2beta1:Dashboard|apps.grafana.com/v2beta1:Dashboard> and matching mappings, but the generated type ended up being grafana.apps.grafana.com.Dashboardechoing-dinner-19531
03/31/2026, 11:59 AMechoing-dinner-19531
03/31/2026, 12:01 PMgrafana:apps/v2beta1/dashboard:Dashboardlimited-rainbow-51650
03/31/2026, 12:06 PMmoduleFormat in the Kubernetes schema.json. I'll try your suggestion, but I had hoped to understand how Pulumi resource type to SDK type generation works. Understanding why it works for the Kubernetes provider would have brought me a step further in understanding.echoing-dinner-19531
03/31/2026, 12:07 PMlimited-rainbow-51650
03/31/2026, 12:09 PMmoduleFormat , while my bridge provider has "moduleFormat": "(.*)(?:/[^/]*)" 💡limited-rainbow-51650
03/31/2026, 12:22 PMmoduleFormat is a thing. Mainly because it is hardcoded for TF-bridged providers:
https://github.com/pulumi/pulumi-terraform-bridge/blob/736bb6d87fca760e830c4cf62c46b79d3c5f7608/pkg/tfgen/generate_schema.go#L287echoing-dinner-19531
03/31/2026, 12:29 PM