bitter-scooter-78136
08/25/2025, 8:00 AMsilly-country-86708
08/25/2025, 8:53 AMpulumi env open ...  or any other context?bitter-scooter-78136
08/25/2025, 10:37 AMfreezing-pilot-97749
08/25/2025, 2:00 PMbitter-scooter-78136
08/25/2025, 2:17 PMconfig:
  env:secrets:
    LICENSE_KEY:
      secure: <ENCRYPTED_KEY>
    ....
# index.ts
const secrets = config.getObject<{ [key: string]: string }>("secrets") || {};
const secretEntries = Object.entries(secretsObj).map(([key, value]) => {code which creates yaml file and saves it esc environment}
This takes really long to get running.
I was hoping that when everything is in esc other stack will load fast enough
#Pulumi.production.yaml
config:
...
environment:
  - org/production
But other stack then is taking same time to load and decrypts secrets one by onefreezing-pilot-97749
08/25/2025, 2:33 PMbitter-scooter-78136
08/25/2025, 2:36 PMimport * as pulumi from "@pulumi/pulumi";
export const config = new pulumi.Config();
const secrets = config.requireSecretObject<Record<string, any>>("application");
pulumi.all([secrets]).apply(([secretsObj]) => {
  const secretEntries = Object.entries(secretsObj)
    .map(([key, value]) => {
      return `    ${key}:\n      fn::secret: "${value}"`;
    })
    .join("\n");
  let yamlContent = `values:
  pulumiConfig:`;
  if (secretEntries) {
    yamlContent += `\n${secretEntries}`;
  }
  return new pulumi.asset.StringAsset(yamlContent);
});
pulumi upfreezing-pilot-97749
08/25/2025, 2:43 PMfreezing-pilot-97749
08/25/2025, 2:48 PMbitter-scooter-78136
08/25/2025, 2:51 PMenvironment:
  - org/productionbitter-scooter-78136
08/25/2025, 2:54 PMconst client = esc.DefaultClient();
const clientEnv = client
      .openAndReadEnvironment("org", "project", "production")
      .then(envConfig => {
envConfig?.values?.pulumiConfig #fetching values from there
})
Then it works like a charm, but I suppose properly working
environment:
  - org/production
is how it should be working šfreezing-pilot-97749
08/25/2025, 3:00 PMenvironment normally. I suspect it's still loading the stack secretsfreezing-pilot-97749
08/25/2025, 3:01 PMbitter-scooter-78136
08/25/2025, 3:02 PMfreezing-pilot-97749
08/25/2025, 3:10 PMsilly-country-86708
08/26/2025, 1:41 AM