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-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
#golang
Join Slack