Thread
#general
    b

    bored-table-20691

    8 months ago
    What’s the easiest (lowest friction) alternative to a dynamic provider for Go? I have an API I need to work with that does not have a Pulumi package, and I’d prefer to avoid needing to define a whole package for it just to make some progress.
    b

    billowy-army-68599

    8 months ago
    the new pulumi command provider: https://www.pulumi.com/registry/packages/command/
    b

    bored-table-20691

    8 months ago
    @billowy-army-68599 thanks. If I am reading this correctly, I basically have to create a separate program that I can exec (either by calling something like
    curl
    or by writing my own Python/bash script or what not) - I can’t just define a function in Go and have it be executed. Is that right? And one more follow up - in the Command examples, the GithubLabel one is probably the closest. It has the note on
    local.Command
    missing
    diff/update/read
    . Does this mean that it will apply updates to the
    Command
    resource (e.g. if the commands change) by first doing the
    delete
    and then doing a
    create
    again, or something else? Just trying to understand how it fits into the overall lifecycle.
    b

    billowy-army-68599

    8 months ago
    that's right yeah, for the github one, you'd need to define your own scripts for diff/update/read
    b

    bored-table-20691

    8 months ago
    I’m not sure I follow - I think I’d need to define my own scripts for
    create
    and
    delete
    , yes? There’s no way for me to define scripts for
    diff/update/read
    , as that isn’t supported yet by
    local.Command
    ?
    b

    billowy-army-68599

    8 months ago
    ah yes, that's my mistake, you're right. sorry about that
    b

    bored-table-20691

    8 months ago
    OK, so with that in mind, let’s take the
    GithubLabel
    example from the doc. If I were to make a change to that resource (e.g. change the
    name
    in
    LabelArgs
    ), would Pulumi automatically do a
    delete
    on the old one and
    create
    on the new one? i.e. it would handle the lifecycle, it would just do it “less efficiently” (i.e. always as a
    delete-create
    rather than as
    update
    )
    b

    billowy-army-68599

    8 months ago
    i believe so, yes
    b

    bored-table-20691

    8 months ago
    OK - thank you. Am I actually saving a lot of pain (given I’ll need to create external scripts now) or should I just go and create a package for this?
    b

    billowy-army-68599

    8 months ago
    ultimately you can run anything, you could create go binaries and run them!
    b

    bored-table-20691

    8 months ago
    Yes 🙂 I’m just wondering if the effort of creating all of these external things (e.g. a script/program for create, one for delete, etc) is going to end up being less work than creating an actual package