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

brave-nightfall-19158

10/10/2021, 7:23 PM
Hi all! I've just started with Pulumi and the trial version as we currently have approx 3-400 resources in Cloudformation and I'm trying out something new. I've just started with the index file, but wondering as I couldn't find any help anywhere, if there are best practices for splitting the resources into different files / folder structure? Every example I've seen shows all resources in the index file but this is not manageable. How do others do this? Any help/ideas are much appreciated as I start the Pulumi journey!
b

billowy-army-68599

10/10/2021, 7:51 PM
Hey Jason! There's a couple options, but generally we recommend building ComponentResources which you can import: https://github.com/pulumi/examples/search?l=TypeScript&q=ComponentResource You can reuse these either locally, or from a package manager
🙌 1
b

brave-nightfall-19158

10/10/2021, 8:08 PM
Ahhh that looks great Jaxx thanks for the info. It seems very complex for what I need, i.e. just separating code so my index file is not 10,000 lines! What other ways are there, or is this really the best way?
b

billowy-army-68599

10/10/2021, 8:16 PM
you can also just use whatever mechanism your programming language would use for this, with functions and imports that way
4 Views