Hi my new role uses Pulumi across Python/Node wher...
# general
m
Hi my new role uses Pulumi across Python/Node where each repo has its own decoupled infra. I am moving to create a monorepo for all our infrastructure. I come from a Terraform background and was wondering what is the recommended way to do it? Can a monorepo with Pulumi infrastructure exists across different languages? I have a strict requirement that my platform team creates reusable modules across things such as AWS S3/RDS/etc. Is this possible with Pulumi? Are there any examples showing how this works?
a
The general way is to use multiple stacks. 1, command infra stack, like vpc, dns, s3, etc 2. app-specific stacks, like ecs, alb, etc. these can use stack ref, to access resources defined in infra stack
each stack can use different programming languages
l
Also you can publish component libraries across languages. Since you're just getting started, I recommend adopting this from day 1 and setting standards for it, it's really useful in heterogenous environments. https://www.pulumi.com/docs/iac/using-pulumi/build-a-component/ https://www.pulumi.com/blog/registry-component-api-docs/
m
hey @magnificent-addition-39385, have a look also into this article https://www.pulumi.com/blog/iac-best-practices-structuring-pulumi-projects/ and series. Will help you a lot in this topic.
m
Thanks everyone