Is it considered good practice to create resources...
# typescript
c
Is it considered good practice to create resources within a class instead of just defining them top-level in a file? Would that be a special kind of class (inherit from something?) or just a plain regular typescript class?
t
It depends… If you have reusable bits, wrap them into components https://www.pulumi.com/docs/intro/concepts/programming-model/#components Otherwise, split it into files as you see fit, keep related resources close to each other and unrelated separate.
c
Interesting. I will dive into that by trying it out. 🙂