rich-branch-4811501/03/2023, 2:21 PM
object from the first program into the second program that creates several virtual clusters inside the cluster from the first program. My questions are: • Is it possible to share the object as it is? • Is it possible to share my own custom
? • To implement that I need to have multiple stacks?
Is it possible to share the object as it is?Yes, just export the type. In typescript this would be
export const cluster = k8s.Cluster(...
Is it possible to share my own custom ResourceComponentsYou can easily reshare ComponentResources using whatever abstraction mechanism your chosen language uses
To implement that I need to have multiple stacks?Can you elaborate on this question?
rich-branch-4811501/03/2023, 2:54 PM
between them do I need to have multiple stacks as well? I'm trying to avoid calling the same ResourceComponent Type with the same resource name in order to share it. @billowy-army-68599
You mean exporting the object?Yes that works too
cluster = k8s.Cluster pulumi.export("cluster", cluster)
I meant that if I want to have multiple pulumi programs (let’s say 2) that shares ResourceComponents between them do I need to have multiple stacks as well?Yes, each Pulumi program has
stacks. So in this case you’d have perhaps two projects: • cluster • app and each one of those projects would have a stack each, maybe called
that shares ResourceComponents between themCan you explain what you mean by “sharing” ? referencing the results of one project from another?
rich-branch-4811501/03/2023, 4:19 PM
rich-branch-4811501/04/2023, 9:21 AM
when I'm getting a warning
myCustomCluster = cluster_stack.get_output("sharedCluster") def create_vcluster():