damp-table-85095
11/20/2024, 6:21 PMstocky-restaurant-98004
11/20/2024, 8:13 PMdamp-table-85095
11/20/2024, 8:14 PMstocky-restaurant-98004
11/20/2024, 8:18 PMstocky-restaurant-98004
11/20/2024, 8:20 PMstocky-restaurant-98004
11/20/2024, 8:20 PMdamp-table-85095
11/20/2024, 8:38 PMstocky-restaurant-98004
11/20/2024, 8:56 PMdamp-table-85095
11/20/2024, 8:57 PMdamp-table-85095
11/20/2024, 8:57 PMdamp-table-85095
11/20/2024, 8:58 PMdamp-table-85095
11/20/2024, 8:59 PMdamp-table-85095
11/20/2024, 9:02 PMstocky-restaurant-98004
11/20/2024, 9:03 PMdamp-table-85095
11/20/2024, 9:04 PMstocky-restaurant-98004
11/20/2024, 9:04 PMstocky-restaurant-98004
11/20/2024, 9:05 PMdamp-table-85095
11/20/2024, 9:07 PMdamp-table-85095
11/20/2024, 9:18 PMstocky-restaurant-98004
11/20/2024, 9:18 PMstocky-restaurant-98004
11/20/2024, 9:19 PMdamp-table-85095
11/20/2024, 9:31 PMenough-architect-32336
11/26/2024, 9:42 PMsalmon-carpet-1576
12/26/2024, 3:48 PMenvironmentVariables
in ESC, so we can use pulumi env
to run commands in different environments or generate dotenv
files:
pulumi env run staging -- command
In our Pulumi IaC, we generate non-secret configuration values, like service URIs or IP addresses, that we also want to store in ESC. Is it possible to write these output values to existing environment in ESC(i.e staging
, production
,etc) from our IaC code?
The psuedo code would be something like:
// create service
srv, err := cloudrunv2.NewService(...)
// save service URI as an env var in ESC
auto.SetEnv("SOME_SERVICE_URI", srv.Uri)
If not, is there a good way to achieve what we are looking for?hallowed-baker-22997
01/02/2025, 5:25 PM// service stack
srv, err := cloudrunv2.NewService(...)
ctx.Export("service_uri", srv.Uri)
// esc environment
values:
stackRefs:
fn::open::pulumi-stacks:
stacks:
serviceInfra:
stack: some-service/dev
environmentVariables:
SOME_SERVICE_URI: ${stackRefs.serviceInfra.service_uri}
salmon-carpet-1576
01/02/2025, 5:37 PMhallowed-baker-22997
01/02/2025, 6:00 PM