Channels
welcome
pulumi-cdk
cloudengineering
yaml
blog-posts
localstack
pulumi-ai
package-authoring
general
pulumiup-booth-support
oracle-cloud-infrastructure
learn-pulumi-events
linen
registry
built-with-pulumi
pulumi-cloud
contribex
testingtesting321
hacktoberfest
pulumi-crosscode
content-share
finops
multi-language-hackathon
office-hours
workshops
gitlab
pulumi-kubernetes-operator
jobs
pulumi-deployments
dotnet
aws
golang
announcements
java
pulumiverse
python
install
getting-started
cloudengineering-support
testingtesting123
hackathon-03-19-2020
typescript
google-cloud
contribute
azure
kubernetes
docs
automation-api
status
Powered by
#typescript
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. 🙂
Post