Hi, All. Hopefully Quick Question: Can one use a...
# getting-started
i
Hi, All. Hopefully Quick Question: Can one use a single Pulumi yaml file to store a shared secret across multiple stacks? Or does the secret need to be defined in each stack yaml file?
a
Use an environment defined in pulumi cloud.
Then you can import the environment into stacks
l
You cannot use Pulumi.yaml for this, it doesn't support secrets (and it would be hard to get it to, since Pulumi-managed secrets are encrypted with a stack-specific key). If Pulumi ESC isn't suitable for you, you can use any encryption library your chosen language supports, and store the encrypted value in a local file. However it's probably worth taking advantage of a vault of some kind so that the secret is available from any machine but not stored in your git repo (even encrypted).