Hi <#C01PF3E1B8V|getting-started>, I have been loo...
# getting-started
Hi #getting-started, I have been looking on guidance and best practices on how to organize stack code to best manage and version control (Azure and dotnet stack, multitenant SaaS app). Most samples I looked at in your C# collection of samples group all code in a single Stack.cs. I was hoping I could find something more component-based, with configuration separated from stack code, so we can easily set up our delivery processes around it. How would you separate configuration from implementation, and allow a build pipeline to automatically compose stacks based on environment variables and such?
We have one stack, but are creating different parts of the stack in dedicated extension methods to keep it maintainable. From the Stack constructor, we call those extension methods. So far, our stacks are not extremely big, so this is good enough for us. All our deployments are getting the output of Pulumi first, set variables based on that and the rest of the pipelines use those variables where needed.
Further more, we have standardized methods for components (a standard webapp, a standard storage account, etc.) that we call from those extension methods.
Thanks @quiet-architect-74241, super helpful! Then I guess you can create test projects with "unit stacks" or single components, using the standardized methods. I will give it a try.
👍 1