delightful-daybreak-41063
09/26/2022, 10:32 PMpulumi up
and install stuff via UserData, but now I’m hoping to sidestep the pulumi up
command and just start the instance in the CLI app?
I see that I can import github.com/pulumi/pulumi/pkg/v3/cmd/pulumi is made public in go mod
, and I have access to the NewPulumiCmd() cobra.Cmd
, which seems to be the only valuable thing that is exported. I assumed I could just call the NewPulumiCmd.Run()
and pass in any cli parameters I would have normally passed in, but that package is “package main”, so go doesn’t want me to import it, giving the error: import "<http://github.com/pulumi/pulumi/pkg/v3/cmd/pulumi|github.com/pulumi/pulumi/pkg/v3/cmd/pulumi>" is a program, not an importable package
.
Is this a problem that has been asked about before? Is this the first time it has been asked? Is this just the wrong thing to be doing with the tool? Are we opposed to moving all the sub-commands to a nested package (i.e. /pkg/cmd/pulumi/cmds/up.go) and making them Public?billowy-army-68599
09/26/2022, 10:38 PMdelightful-daybreak-41063
09/27/2022, 1:41 AMbillowy-army-68599
09/27/2022, 1:18 PMdelightful-daybreak-41063
09/27/2022, 7:27 PMgo mod
import it
I also tried adding in different use cases like “start ec2 instance programatically with pulumi”. But those got too far into the ec2 docs for pulumi and all that’s there.
I also tried sprinkling in “reddit”/“stack overflow” to get away from the docs, but that didn’t help quite as much, and eventually I went searching for some official slack/discourse place for pulumi and ended up here.