08/27/2021, 3:29 PM
Hi, I’m working on building a Component Package that encapsulates our default set of k8s config for apps. I’m writing in TypeScript and currently also calling it from a TypeScript Pulumi program. I was hoping to be able to use resource transformations to allow for additional customization from calling program, but when I pass transformations in, my callback only happens for the top-level ComponentResource and none of the children. I found this issue so it seems like I’m probably just out of luck with using transformations with my multi-language package, but just figured I’d make sure I’m not missing anything dumb. I also tried passing my transformations down to individual resources inside the component but that also doesn’t work, presumably because it’s just not implemented. My assumption at this point is that the top-level resource gets called because it’s considered to be a “native” resource but the children aren’t?


08/27/2021, 3:48 PM
I found this issue
Yes - this is a (really the only) current limitation for multi-language components. We don't have a mechanism today to call the transformation function in your source language from the component-implementation language (across different processes). The primary workaround for some cases of this is to implement a transformation inside the component, which will apply to all the component children, and perhaps pass an input to the multi-langauge component to decide when to apply this transformation and how to parameterize it. This certainly doesn't cover all cases of transformations, but it has been enough to unblock some users who have hit the need for this. We certainly want to add this support in the near future, though it depends on some new machinery being added to support cross-language callbacks.


08/27/2021, 3:50 PM
Got it. Thanks for the clarification!