https://pulumi.com logo
#typescript
Title
# typescript
s

sparse-student-54516

10/27/2021, 11:24 AM
Hi, Can you we divide the pulumi code from a single file
e.g. index.ts
-> multiple file
e.g network.ts, server.ts, storage.ts
?
m

millions-furniture-75402

10/27/2021, 1:00 PM
Yes
s

sparse-student-54516

10/27/2021, 1:09 PM
oh Good 🙋
@millions-furniture-75402 Is there an example I can check or see how it is done?
m

millions-furniture-75402

10/27/2021, 1:13 PM
There is no "standard" way this is achieved in the Pulumi world yet. Use standard practices for your language of choice. You can see a few examples here: https://github.com/pulumi/examples/ One that comes to mind is: https://github.com/pulumi/examples/tree/master/aws-ts-stackreference-architecture Which uses import https://github.com/pulumi/examples/blob/master/aws-ts-stackreference-architecture/database/src/index.ts#L2 That's a very simple approach.
s

sparse-student-54516

10/27/2021, 1:18 PM
Thanks @millions-furniture-75402 I will check this.
5 Views