Hey, not sure if this is the best channel for this...
# esc
b
Hey, not sure if this is the best channel for this. But I’ve noticed my pulumi up getting pretty slow recently and it seems related to ESC My stack has 129 resources (mostly AWS) and my ESC config has around 150 secrets in it. I’m noticing on pulumi up there are a lot of API calls to decrypt each individual secret and this happens in sequence. Each API call takes from 200 - 500 ms to complete so in total it can take up to 40 seconds to decrypt everything. This block of decrypt calls happens maybe 6 or 7 times throughout the up operation so in total it’s adding 4 or 5 minutes and the the same keys are being decrypted again and again. Are there some optimisations and or best practices I should be taking in regards to my ESC config? I use both
config.getObject(key)
or
config.requireObject(key)
in a few places throughout my code - not sure if this is causing pulumi to decrypt every secret in the stack even when i’m just getting a single key. I’m using Typescript. More details in thread…
Example log
Copy code
...
I1031 22:03:24.362070   32849 api.go:326] Pulumi API call response code (<https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>): 200 OK
I1031 22:03:24.385326   32849 api.go:312] Making Pulumi API call: <https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>
I1031 22:03:25.081472   32849 api.go:326] Pulumi API call response code (<https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>): 200 OK
I1031 22:03:25.081836   32849 api.go:312] Making Pulumi API call: <https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>
I1031 22:03:25.396691   32849 api.go:326] Pulumi API call response code (<https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>): 200 OK
I1031 22:03:25.416401   32849 api.go:312] Making Pulumi API call: <https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>
I1031 22:03:25.724617   32849 api.go:326] Pulumi API call response code (<https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>): 200 OK
I1031 22:03:25.744565   32849 api.go:312] Making Pulumi API call: <https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>
I1031 22:03:26.067313   32849 api.go:326] Pulumi API call response code (<https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>): 200 OK
I1031 22:03:26.089014   32849 api.go:312] Making Pulumi API call: <https://api.pulumi.com/api/stacks/[redacted]/[redacted]/prod/decrypt>
...
Copy code
pulumi about
CLI
Version      3.137.0
Go Version   go1.23.2
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws         6.54.1
resource  awsx        2.11.0
resource  cloudflare  5.30.0
resource  docker      4.5.4
resource  docker      3.6.1
language  nodejs      unknown

Host
OS       darwin
Version  14.5
Arch     arm64
p
Can you DM me your Org name, Environment name, and Definition?
We've created an issue to improve performance here: https://github.com/pulumi/pulumi/issues/17660
b
Cheers - thanks Arun 👍