https://pulumi.com logo
Title
f

famous-bear-66383

03/30/2020, 11:04 AM
This is maybe Typescript related question but it’ll be great if I get at a clarification on it. This a sample
tsconfig.json
with one index.ts containing resource definitions.
{
  "compilerOptions": {
    "strict": true,
    "outDir": "bin",
    "target": "es2016",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "experimentalDecorators": true,
    "pretty": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitReturns": true,
    "forceConsistentCasingInFileNames": true
  },
  "files": [
    "index.ts"
  ]
}
Say if I want to split the resources in
index.ts
into several files. like
service1.ts
service2.ts
and so on .
{
  "compilerOptions": {
    "strict": true,
    "outDir": "bin",
    "target": "es2016",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "experimentalDecorators": true,
    "pretty": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitReturns": true,
    "forceConsistentCasingInFileNames": true
  },
  "files": [
    "service1.ts",
    "service2.ts"
  ]
}
Currently pulumi complains about this seperation, I’ll look for
index.ts
and fails if it’s not found. Thanks 😊
t

tall-librarian-49374

03/30/2020, 11:13 AM
index.ts
is the entry point. you can add more files and reference them from
index.ts
. Otherwise, you can change the entry point in your
Pulumi.yaml
file with
main
property
👍 1