Thread
#general
    c

    colossal-vr-62639

    2 months ago
    When building your own provider, what's the link between the Provider and the SDK? More explicitly, when I run a pulumi action (e.g.
    pulumi preview
    ). Pulumi knows to download and install the appropriate provider for the SDKs i'm using in my Pulumi project.
    l

    limited-rainbow-51650

    2 months ago
    A lot of Pulumi is centered around the Pulumi schema of a provider. Within the schema, you have the
    pluginDownloadURL
    containing the storage location of the provider binary. Every SDK has the schema bundled, which is how it can find out about the location. For some of the SDK packages, we have package dependent hooks which downloads this provider binary during the package install. E.g. for JS/TS NPM packages, we consistently have an
    install
    script:https://github.com/pulumi/pulumi-azure-native/blob/master/sdk/nodejs/package.json#L16
    c

    colossal-vr-62639

    2 months ago
    @limited-rainbow-51650 how would I for example test my plugin locally?
    l

    limited-rainbow-51650

    2 months ago
    If you have built the provider binary locally, and it is named
    pulumi-resource-<yourname>
    , then make sure it is on your
    PATH
    and you should be good to go to test locally.
    If you started your provider development from one of our template repos, the build setup should create the binary in the
    ./bin
    folder of your project.
    c

    colossal-vr-62639

    2 months ago
    Thanks @limited-rainbow-51650
    I'm running into an issue
    Grpc.Core.RpcException: Status(StatusCode="Unknown", Detail="Invalid character(s) found in major number "sample-provider\\n0"")
    l

    limited-rainbow-51650

    2 months ago
    Is this when running locally? Are you bridging an existing TF provider or are you developing a native one?
    c

    colossal-vr-62639

    2 months ago
    I'm developing a native one
    l

    limited-rainbow-51650

    2 months ago
    Did you bootstrap from this template?https://github.com/pulumi/pulumi-provider-boilerplate
    c

    colossal-vr-62639

    2 months ago
    I didn't, no. I've just been cobbling pieces together based on the pulumi providers i've seen. Taking some inspiration from the pulumi aws native provider.
    It is when running locally, yes
    The version file looks like this
    sample-provider\n0.0.0+dirty
    l

    limited-rainbow-51650

    2 months ago
    We are aware we have to make this whole provider development much more simple. Is it an option to restart your effort using the boilerplate repo, initialize it using these instructions, and then overlay your existing code on top of it?
    c

    colossal-vr-62639

    2 months ago
    I can do that.
    I resolved the issue though
    I'll provide feedback as I go along if that's ok
    l

    limited-rainbow-51650

    2 months ago
    Please do! We want to know what are the hurdles you run into.
    I don’t have much time today anymore to follow up on this, but ping me tomorrow if you would like to review your setup in case of problems.
    c

    colossal-vr-62639

    2 months ago
    Thank you kindly! Will do
    l

    limited-rainbow-51650

    2 months ago
    Good luck! And curious what you are building… 😉
    c

    colossal-vr-62639

    2 months ago
    At the moment, it's a POC for an provider to be used internally
    l

    limited-rainbow-51650

    2 months ago
    Nice to hear you leverage the provider development path to manage internal APIs! 🎉