w

    wet-gigabyte-99270

    5 months ago
    Is it possible to use Azure Functions endpoints to wrap pulumi Automation? I have some simple pulumi TS code that creates a resource group and want to hit an endpoint in azure that will then provision a resource group for me. Basically const stack = await LocalWorkspace.createStack({ stackName: orgAndStack, projectName, program: createPulumiProgram(context, content), } ); inside an azure function. I have tried and I can run it locally but not on azure. Errors are "errno": -4058, "code": "ENOENT", "syscall": "spawn pulumi", I think this implies it tries to call the CLI which I guess is not available at the point where the code is executed. Should I just dump all my stuff into a docker container instead and give up on the Azure Functions idea?
    b

    bored-oyster-3147

    5 months ago
    Currently automation api requires the use of the CLI locally still. So if you can't make that accessible within the azure function than it won't be doable
    w

    wet-gigabyte-99270

    5 months ago
    Alright. Thanks, I suspected this, really good to get a confirmation. I have set up a new path hosting this in a container instead. Adding the CLI to the container should be much simpler, I hope 🙂
    b

    bored-oyster-3147

    5 months ago
    It was implemented modularly such that there are plans to not need the CLI eventually and it could be pulled out / replaced, but that's probably a ways off. Good luck!
    b

    bored-activity-40468

    5 months ago