This message was deleted.
# typescript
s
This message was deleted.
w
I keep different 'layers' in different projects (and use stack references where necessary). Then I keep different functional / logical areas in different files in each project.
l
ComponentResources are very lightweight. I use them for everything. In addition to being Pulumi's answer to OO, they're also handy for expressing relationships and hierarchy in the
pulumi preview
graph.
s
oooh nice, thanks for both of the replies. Gives me some things to consider
h
I've sometimes just used plain old functions like
configureNetwork
- it's nice when trying to tidy up later on when resources are all created at the top level - at least functions let you break it down into smaller pieces and put them in different files. That said, ComponentResources are great when there's a clear boundary and grouping from the start
s
yeah I was trying with basic functions and getting hung up a bit on all the junk I end up needing to pass in and return back from the function
seems like functions make sense when you have a small function signature. things like "take some parameters and give me back a vpc object" definitely make sense as helper functions
m
+1 for using ComponentResources.