https://pulumi.com logo
#pulumiverse
Title
# pulumiverse
d

delightful-napkin-38557

01/23/2023, 7:00 PM
Hello ! I'm trying to be a new Pulumi native provider using
<https://github.com/pulumi/pulumi-provider-boilerplate>
and
<https://github.com/pulumi/pulumi-go-provider>
. I'm looking for an example how can I implement my own
Configure
method of my Provider. Does anyone has an example to share ?
h

helpful-psychiatrist-14458

01/26/2023, 9:47 PM
Hi @delightful-napkin-38557, I had the same question, and could not find any good examples (all the native providers seem to be code gen'd and hard to understand) Here is what I came up with for our native provider: https://github.com/zeet-dev/pulumi-zeet-native/blob/main/provider/pkg/config/config.go#L11
d

delightful-napkin-38557

02/02/2023, 4:36 PM
thanks ! but you still have the pkg folder, which seems to be not the latest way to build provider
h

helpful-psychiatrist-14458

02/02/2023, 6:18 PM
Ah, I wasn't aware of a convention excluding internal packages. The ConfigureFunc could be implemented in the main package instead.
d

delightful-napkin-38557

02/02/2023, 9:33 PM
I finally got my own native provider
but is there an example how to write tests ?
I don't see any test in the existing pulumi providers ...
3 Views