Is it possible to set the ESC environment for Pulu...
# esc
m
Is it possible to set the ESC environment for Pulumi to use using an environment variable? Would like to avoid creating a config.yaml file solely to point to ESC
f
You're probably looking for the ESC SDK, see https://www.pulumi.com/blog/esc-sdk-launch/
m
The scenario I am looking at here is triggering a Pulumi deployment to run from REST API, and I want to set what ESC environment it consumes values from at deploy time, without the need to commit any files to Git
f
my first thought there is from the rest api call, (i assume) grab the ESC env name, get the config from ESC SDK functions, then pass that to the automation api to deploy. not sure if there's an exact example around for that though; i will try to look around
m
I figured out a way to make this work, I used the preRunCommands option to run Pulumi config env add command
1
🔖 1
f
ah nice, yeah much simpler if that's all you need :)
r
@miniature-leather-70472 I was about to suggest the same thing! Glad you got it working.
high five 1