No clear way how to get ESC secrets in a Pulumi application #11526
Labels
area/docs
Improvements or additions to documentation
kind/enhancement
Improvements or new features
resolution/fixed
This issue was fixed
Milestone
File: themes/default/content/docs/concepts/secrets.md
I am just starting out with Pulumi and ESC.
I could not figure out from the documentation how to get a secret from Pulumi ESC and make use of it in my application.
I have created the secret and imported it in my stack, and I can successfully deploy for example a EKS cluster relying on the magic behind the scenes that sets it as environment variables, but when I want to pass something to a provider it was very hard to figure out how to get the secret correctly.
Example that I expect to work:
My environment definition:
In my application (typescript):
But I receive the error:
I was expecting to be able to use it like I do above, and I think I have misunderstood something? I struggled to find any relevant documentation.
My current workaround feels very hacky and clumsy, but it gets the job done:
The text was updated successfully, but these errors were encountered: