https://pulumi.com logo
Title
b

billowy-processor-56040

04/04/2022, 6:18 PM
Hi folks, looking for a bit of help with the login capability. Is there a way to run the pulumi login from the automation API ?
m

millions-furniture-75402

04/04/2022, 6:48 PM
FWIW, the automation API is simply wrapping the Pulumi CLI https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/automation/cmd.ts#L43-L59
b

billowy-processor-56040

04/04/2022, 8:49 PM
interesting, thanks for sharing that code snip.
so , how would one use the pulumi.auto module to run 'pulumi login .. '
m

millions-furniture-75402

04/04/2022, 9:28 PM
You'd have to patch the library, or do the same pulumi cmd wrapper like there,
const proc = childProcess.spawn("pulumi", "login", { env, cwd });
But... I think that's an interactive command. Maybe you shouldn't be doing
pulumi login