This message was deleted.
# general
s
This message was deleted.
m
The TLS provider allows you to do this. https://www.pulumi.com/docs/intro/cloud-providers/tls/
It will only generate the key once.
f
@microscopic-dress-1605 Thank you! That solves my problem, but I am still curious what the Pulumi team thought how Secrets would work programmatically?
g
You can mark stack outputs as secret, so that you can access them later. https://www.pulumi.com/docs/intro/concepts/secrets/#programmatically-creating-secrets
👍 1
m
Good point. Note that the
tls.PrivateKey.privateKeyPem
is already marked as a secret and stored encrypted in the Pulumi state.
☝️ 1
f
@gentle-diamond-70147 That’s not the same behaviour. I want to fetch a secret under a key if it exists, or generate it.