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

square-rose-64819

04/01/2020, 6:07 PM
what's the best way to break down my index.ts file into multiple configuration modules? i've noticed that if i make a new module and import it from within my index.ts file, pulumi won't create any of the resources unless i reference them, e.g. by exporting them. i'm guessing this is because node is immediately garbage collecting them or removing the import because its not used.
w

white-balloon-205

04/01/2020, 6:08 PM
've noticed that if i make a new module and import it from within my index.ts file, pulumi won't create any of the resources unless i reference them
This is a slightly unfortunate TypeScript gotcha. If you use
import "file"
syntax, it should work.
👍 1
s

square-rose-64819

04/01/2020, 6:13 PM
that worked, thanks for the quick answer @white-balloon-205!
3 Views