https://pulumi.com logo
Title
c

calm-iron-40008

07/24/2022, 11:27 PM
Hoping for some guidance here… The directory structure and tsconfig in… https://github.com/pulumi/examples/tree/master/testing-unit-ts/mocha indicate that you can use multiple typescript files in a pulumi project. I’m trying to separate infrastructure from deployments (kubernetes), but I cannot get pulumi to identify ANY other typescript/js files in the directory. They are explicitly defined in the tsconfig… Any guidance?
b

billowy-army-68599

07/24/2022, 11:29 PM
it’s definitely possible, what are you trying? are you exporting functions or using components?
c

calm-iron-40008

07/24/2022, 11:32 PM
I just started with Pulumi, so forgive me… I have tried to create and export functions so far… I’ve used functions from the examples in files not named index.ts/js… Pulumi does not recognize the files NOT named index, however, these same functions within index.ts work properly.
Working on AWS EKS… Just wanting to logically define AWS (VPC, SG, etc.) from EKS Cluster from kubernetes deployments
The background is… company is agile and using node/react, I’ve lost a little faith in Terraform state maintenance… Looking at Pulumi to provide IaC and standardize on a TS codebase.
b

billowy-army-68599

07/25/2022, 12:15 AM
@calm-iron-40008 you’ll need to import the files into
index.ts
I would strongly recommend going down the second path, you get a bunch of benefits from using component resources like making them packageable
🙌 1
c

calm-iron-40008

07/25/2022, 3:20 PM
Thanks… I’ll head that way.