https://pulumi.com logo
#general
Title
# general
f

famous-kite-69533

04/09/2020, 1:20 PM
Hi all, is it possible to create a secret from file, or alternatively a multiline secret? I need to create a secret that is the result of the command
openssl rand -base64 128
b

broad-helmet-79436

04/09/2020, 1:21 PM
It should definitely be possible, but I think how to do this depends on the provider. What’s the secret from? kubernetes, aws, gcp, …? Can you generate the secret once and stick it (encrypted) in the config with
pulumi config set --secret <name> <value>
?
oh. do you mean adding a secret to your config?
f

famous-kite-69533

04/09/2020, 1:22 PM
It seems to have worked with
pulumi config set --secret metallb-secretKey "$(openssl rand -base64 128)"
🙂
b

broad-helmet-79436

04/09/2020, 1:22 PM
nice!
pulumi config set
also accepts data from stdin if you don’t pass a
value
so
openssl rand -base64 128 | pulumi config set --secret metallb-secretKey
should also work
f

famous-kite-69533

04/09/2020, 4:08 PM
Oh nice to know, thanks! 🙂