Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
package-authoring
pulumi-ai
pulumi-cdk
pulumi-cloud
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by
Title
c
cuddly-smartphone-89735
01/22/2020, 3:33 PM
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
tall-librarian-49374
01/22/2020, 3:45 PM
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
cuddly-smartphone-89735
01/22/2020, 4:04 PM
Interesting. I will dive into that by trying it out. 🙂
#typescript
Join Slack