powerful-room-57148
05/16/2022, 3:22 PMpulumi/getStack()
from the JS/TS SDK?mammoth-salesclerk-61945
05/16/2022, 3:24 PMPulumi.run(ctx -> { ctx.stackName() }
https://www.pulumi.com/docs/reference/pkg/java/com/pulumi/Context.htmlpowerful-room-57148
05/16/2022, 3:24 PMrun
?getStack
is equivalent to a static method I think — no instance of anything needed.mammoth-salesclerk-61945
05/16/2022, 3:29 PMPulumi.run
runs a function inside of the engine.
I think you'd have to pass Context
around. We don't support Context.getCurrentStackName()
(yet?)
You could probably implement it with some sort of wrapper function/Class around Pulumi.run
to set a singletonpowerful-room-57148
05/16/2022, 3:30 PM