modern-electrician-38377
04/19/2023, 9:57 PMcrd2pulumi
tool, but can’t seem to find a dedicated channel on that topic. Please let me know if there’s somewhere better to post this q!
I’m trying to generate Typescript code for multiple CRDs from the same project. Specifically, I’m trying to generate code for Traefik’s IngressRoute
and Middleware
resources. Based on the usage described in the README, it seems like you can only point crd2pulumi
to a single file. My approach has been to generate code for each CRD yml file and then move the generated code into separate directories (see attached screenshot).
I’m able to import and use the generated classes (yay!). However I see the following error when importing two classes in the same Pulumi program:
TypeError: Invalid Version:
The printed stack trace that points me to a line that reads pulumi.runtime.registerResourceModule("crds", "<http://traefik.containo.us/v1alpha1|traefik.containo.us/v1alpha1>", _module)
.
It looks like the version in each package.json
is empty, but I’m finding it curious that this error only seems to occur when I try to import two different classes generated as described above. Wondering if there’s some sort of conflict since I’m registering the same resource module twice? Am I just missing how to generate code for multiple CRDs that belong in the same module?
Thanks in advance for any advice here!billowy-army-68599
04/19/2023, 10:32 PMmodern-electrician-38377
04/19/2023, 10:33 PM