I encapsulate related resources into component resources and separate them into separate files that way. My stack class then declares large numbers of resources with only a few high-level abstract component resource declarations.
👍 1
bored-oyster-3147
09/10/2021, 5:57 PM
For example a simple application's stack class might end up just declaring:
• cluster resources / anything shared
• backend component resource
• frontend component resource
• dns
bored-oyster-3147
09/10/2021, 5:59 PM
Of course if you don't want to do the component resource route, you could just as easily place static classes in separate files with a static entrypoint function in each to organize your code. Then your stack constructor could just call those static functions.
b
broad-chef-99140
09/12/2021, 3:22 PM
Thanks @bored-oyster-3147 I'll take a look at that approach Do you know of a sample anywhere I could look at?