This message was deleted.
# general
s
This message was deleted.
s
My preference is to follow the composition root pattern - put components representing logical chunks of infrastructure in separate files and instantiate them in the main file
d
If part of my script entails building a docker image and deploying it on some platform, how would you instantiate a component from the main file to get that done? Is there some sort of aggregate component you could create and then instantiate out of main?
s
Yes, look at subclassing ComponentResource
c
@damp-table-85095 Here are how to use resources, components, and stack references for inputs and outputs Resources: https://www.pulumi.com/docs/intro/concepts/programming-model/#resources Components: https://www.pulumi.com/docs/intro/concepts/programming-model/#components Stack References for input/output: https://www.pulumi.com/docs/intro/concepts/programming-model/#stack-references