This message was deleted.
# general
s
This message was deleted.
b
My team uses a suite of component resources for our most common use-cases.. but what are you looking to do specifically?
r
Thanks for replying Joshua. So we have an existing pattern book for AWS for some of our business components. We are going to use pulumi, but want to build out these patterns which could be reused for other patterns...if that makes sense?
b
Nice. Yea, that makes sense. We use the .NET SDK and we have an internal NuGet repository so we package component resources into NuGet packages to be shared internally. It works for us. We don't really use stack references because we use self-hosted state backend in S3 and tend to separate the state backend by project so the stack references don't work in that case.. but we haven't found that we really need them for our use-case.
It's worth mentioning that the newly announced "pulumi packages" would enable you to build distributable component resources across the different pulumi supported languages. So if one team wants to write their components in TS and the other in GO.. theoretically there is support for that or there will be
p
I've found StackReferences to work well when you want to create separate projects/stacks with different lifecycles, so for example creating a Kubernetes cluster in a separate project which outputs the KubeConfig and then referencing the KubeConfig using StackReference in another stack for managing resources. ComponentResources allow you to create your own abstractions on top of the resources, so you can provide your interfaces for creating your resources.
💯 1
b
r
Thank you Ville and Joshua. I'm keen to look at packages, looked a little confusing on how to build them on first look. Would you build your own components and then package then? I will be using TypeScript.
b
If your team is just using 1 language internally than you probably won't really need to worry about it. Just thought it was worth mentioning. You can write common typescript component resources and internally distribute them however you would normally package typescript libraries
r
packages would work and be nice.
So would it be write a component resource then package?
b
yea I'm not personally familiar with writing packages for the TS ecosystem but however you would normally distribute a private NPM package would work
r
Sorry, I meant building a pulumi package
b
Oh If you want to make it a "Pulumi Package", meaning a consumer from any pulumi supported language could take a dependency on your component resource, than I believe that article points you in the right direction at the bottom. There is a couple different ways to do it
r
I'll take a look. Thank you for your help!
p
Here is a TypeScript boilerplate repository for creating your own component package https://github.com/pulumi/pulumi-component-provider-ts-boilerplate
r
Awesome, thanks Ville!