Hi all, is it possible to have a Pulumi project to...
# general
r
Hi all, is it possible to have a Pulumi project to allocate resources be broken down into multiple files and folders? similar to how one would structure a Terraform project... For example, inside
dev
I have the file
index.ts
and then inside
dev
I also have another folder
iam
and inside it I have another
index.ts
file. I need
pulumi up
to execute both files. Is it possible?
a
This may be better suited for the language specific channels #typescript probably would be the best bet
w
@rhythmic-tailor-1242, There are two constructs worth looking into: • Component Resources: https://www.pulumi.com/docs/intro/concepts/resources/#components • Stack References: https://www.pulumi.com/docs/intro/concepts/stack/#stackreferences Component Resources allow you to create reusable classes that create one or more resources and then can be used across multiple projects/stacks. These can be referenced as local files or centrally stored as modules. Stack References allow a stack to get data from a different stack. This page may also help: https://www.pulumi.com/docs/guides/organizing-projects-stacks/
a
@witty-candle-66007 I think they were referencing doing something like this(Currently not working example) https://github.com/M1kep/pulumi-learning/tree/main/github-typescript-with-oidc/src In the teams folders you have the team definitions, and in the repository folders you have the repository definitions. With traditional TF, there was no need to import or anything like that. But with TS, it’s a bit harder. Personally I’m also curious about whether or not there are any ways around this. I’m not hopeful though