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