So I'm creating a new native provider, how would I...
# general
w
So I'm creating a new native provider, how would I test that locally without pushing? I can get the dotnet package built and into a local nuget, but what about the provider part? is there is something I need to do to get the pulumi cli to recognise it?
b
if the binary is in your
$PATH
as
pulumi-resource-foo
and you try to create a resource called
foo
it should work
the token you’re invoking in the provider and the token in the schema should match
w
ok, will try it...
I couldn't find anything in the .net package that seemed to reference a binary name... or where to find it locally or in the cloud.
How does the CLI know where it is, if it's in my org in the cloud?
b
how are you building yhe provider? There are 2 parts, the generated SDK and the binary that needs to be in your
$PATH
w
I used the boilerplate... https://github.com/martinjt/honeycomb-pulumi-provider I'm planning doing something with publishing to my own github for now, until I'm confident it's going to be useful to others... I was hoping I could do that fully without it being public
and by "public" I mean I don't want it on your registry yet
b
ah i’ve never used that one so not sure how it’d work. it looks like you just need to build the provider binary, copy it to your path and then install the SDK using local nuget
w
yeah, I'm going to try that... I'm more interested now how I'd be able to make that work not locally.. So if I publish the nuget to github packages... and do a go release to github too... then pull that package in, how will the pulumi cli know to get the package from my github org?
b
to make it work not locally you publish the binary to github releases and all the SDKs to package managers
how will the pulumi cli know to get the package from my github org?
You need to set the info in the schema to indicate your github org, like so: https://github.com/lbrlabs/pulumi-remotecertificate/blob/main/provider/cmd/pulumi-resource-remotecertificate/main.go#L25
seems like I have done this before and forgot 😂
w
ah, cool, that makes a tonne of sense now.
it's getting there...