mammoth-smartphone-84174
10/06/2024, 2:19 AMmammoth-smartphone-84174
10/06/2024, 9:06 PMadventurous-butcher-54166
10/07/2024, 10:17 AMesc env init your-org/your-project/your-environment
To edit the environment (you can also do this in the Pulumi Cloud UI)
esc env edit your-org/your-project/your-environment
Example configuration which fetches some stack outputs and exposes them as env vars:
values:
stackRefs:
fn::open::pulumi-stacks:
stacks:
networkProd:
stack: networking/prod
environmentVariables:
ENVIRONMENT: ${stackRefs.networkProd.env}
SOME_OTHER_VAR: ${stackRefs.networkProd.some_other_output}
Then depending on how you'd like to consume the outputs:
In an .envrc
file - see full example
eval $(esc open <your-project-name>/<your-environment-name> --format shell)
Passing env vars directly to a program via esc run:
esc run orbit/networking/output-test -- bash -c 'echo $ENVIRONMENT'
Or via docker env_file
parameter - see examplemammoth-smartphone-84174
10/19/2024, 6:50 PM