https://pulumi.com logo
Title
b

breezy-apartment-46543

03/17/2021, 4:35 PM
Can you get the value of running pulumi whoami from code? Similar to pulumi.getProject() or pulumi.getStack() in JS
m

millions-furniture-75402

03/17/2021, 4:35 PM
probably available in the automation-api
g

gentle-diamond-70147

03/17/2021, 4:37 PM
Also you could shell out to
pulumi whoami
to get it.
b

breezy-apartment-46543

03/17/2021, 4:41 PM
Thanks @millions-furniture-75402
👍 1
I need to be able to get it in my JS @gentle-diamond-70147 but yes thanks
g

gentle-diamond-70147

03/17/2021, 4:44 PM
Yea, you can do
const pulumiUser = child_process.execSync("pulumi whoami");
r

red-match-15116

03/17/2021, 5:18 PM
There is a built-in command for this already @gentle-diamond-70147, as noted by @millions-furniture-75402
👍 1
b

breezy-apartment-46543

03/18/2021, 4:40 PM
Thanks @gentle-diamond-70147