Hello, testing ESC and environment. How to set con...
# general
e
Hello, testing ESC and environment. How to set config vars for the stack from the environment in a code? Like, looking help to write in ts the pseudo-code: SET ALL "VARS-OF-ENV_ABC" TO "STACK_XY"
l
Hey Johannes, are you trying to accomplish this in a Pulumi program or from your own program through the Automation API? In a Pulumi program, the pulumiConfig header in your ESC environment makes those values accessible as config to your stack that imports that environment. Then using the configuration APIs, you can bring those values into the code so you wouldn't need to explicitly say "give all these vars to x stack" you just need to add the environment block in your pulumi.stack.yaml Here is a link on how to incorporate esc into code in either situation: https://www.pulumi.com/docs/esc/environments/#using-environments-with-pulumi-iac