any complex examples with typescript out there? Li...
# general
a
any complex examples with typescript out there? Like classes, interfaces and the like? Just need some advice on how to set it up in an enterprise environment. going beyond the simple index.ts examples ;)
👍 1
r
Maybe this is a bit more complex than just one index.ts? https://github.com/pulumi/examples/tree/master/kubernetes-ts-multicloud
I’m pretty happy using `ComponentResource`s for encapsulating things instead of plain classes because eventually you’ll pass down some `pulumi.Output`s.
Besides that I also use several stacks and `StackReference`s to avoid putting too many resources into one project/stack that don’t really have a 1:1 relationship. But this takes some caution to not end up in exporting/importing tens of properties just to get some association right (good example here is AKS, DNS, Service Principals, Resource Group Names required for the LoadBalancer public IP).
g
You might also be interested in https://www.pulumi.com/docs/guides/crosswalk/kubernetes/ These guides include links to a GitHub repo with full examples