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
#golang
Title
c
cuddly-dusk-95227
09/01/2020, 9:29 AM
I’m interested in how to create reusable packages for golang projects. Does anyone have any examples on what they think the best way to create higher-level abstractions? My gut feel is to create a type to define the inputs, and use a
New()
helper to take in providers and contexts.
l
lemon-agent-27707
09/01/2020, 3:08 PM
Pulumi has component resources which are designed for this. We have a few different examples of implementing this pattern:
https://github.com/pulumi/examples/tree/master/azure-go-webserver-component
https://github.com/pulumi/examples/tree/master/aws-go-s3-folder-component
Docs
https://www.pulumi.com/docs/intro/concepts/programming-model/#components
❤️ 1
c
cuddly-dusk-95227
09/01/2020, 10:27 PM
Ahh! Thanks! I didn’t know about components. Will need to do some research :)
3 Views
Post