https://pulumi.com logo
#getting-started
Title
# getting-started
c

careful-winter-88523

05/24/2023, 2:56 PM
Hey guys! Complete newbie here. Using Digital Ocean & Pulumi - loving it so far. I have a very noobie question to ask... All my IAC is sitting inside the index.ts file and I can't find any examples where people have split the configuration out into multiple files. EG:
Copy code
config ->
    dns.ts
    postgres.ts
    ...*.ts

index.ts
Where index.ts imports from the files within the config folder. Is this possible, or even a good idea? 😅
s

salmon-account-74572

05/24/2023, 3:08 PM
Definitely possible. You’d just split the code into separate files, and import them into
index.ts
. Here’s one example: https://github.com/pulumi/examples/blob/master/aws-apigateway-ts-routes/index.ts
c

careful-winter-88523

05/24/2023, 5:59 PM
Thank you so much! 🙏
s

salmon-account-74572

05/24/2023, 7:23 PM
Happy to help!
2 Views