https://pulumi.com logo
Title
g

gorgeous-printer-90037

01/30/2023, 3:42 PM
Hi - is there any way to either define multiple runtimes OR pass in a runtime binary path via the CLI? I’d like to offer some better UX for people trying to debug Pulumi for people using Go
e

echoing-dinner-19531

01/30/2023, 4:06 PM
By runtime do you mean the pulumi-language-go executable?
g

gorgeous-printer-90037

01/30/2023, 6:50 PM
@echoing-dinner-19531 not really. In the
Pulumi.yaml
file, I’d like to have two
go
runtimes specified. One that just runs the default logic when running
pulumi
commands and one that can be targeted to use a custom binary. Something like
# Pulumi.yaml

name: my-project
runtimes:
  - name: go
  - name: go-debug
    options:
      binary: /script.sh
Could also work with the introduction of a new configuration option, like
extraRuntimes
so that backwards compatibility is maintained. My question really is whether there is anything that allows us to do that currently
e

echoing-dinner-19531

01/30/2023, 9:01 PM
ah, there is kinda for go. You can set an option "binary" to tell the pulumi-language-go host to just exec that file rather than running "go build". I think you could just point that to .sh file with the correct shabang and it would probably work. But that's still only one runtime so you'd have to like comment it out when not using.
g

gorgeous-printer-90037

01/31/2023, 11:09 AM
Yeah, I saw the solution with the custom script. I wanted something I could commit for other people to use with a runtime flag or the like. Thanks for the prompt answer!