This message was deleted.
# typescript
s
This message was deleted.
l
We are using real code now, so the rules of the runtime (in this case Typescript) apply here. The entrypoint to your “program” is
index.ts
. You can structure to multiple files, but you have to
import
them in your
index.ts
file.
e
hmmm, well, that is basically what I said.
but thanks
f
To add to what @limited-rainbow-51650 said, you can control the entrypoint for Pulumi just as you would any Node program by configuring the
main
property in your
package.json
— for example, you could have
"main": "infrastructure.ts"
as your entry point instead of the default
index.ts
w
But I noticed that I not only have to import to index.ts, but I have to use it somehow
Note that if you use
import "./vpc"
syntax, you do not need to "use" the outputs of the imported module for it to be included. This is a slightly unfortunate TypeScript gotcha even outside of Pulumi. https://github.com/microsoft/TypeScript/issues/9191#issuecomment-226258610