Does the pulumi esc support multi line strings? I ...
# general
b
Does the pulumi esc support multi line strings? I am trying to store a PEM key as ESC secret but it doesn't seem to work, the same key works if I use pulumi config set command.
g
Hi Vishal, it should. Maybe a leading/trailing character is sneaking in there?
b
Did you create them using the table view in UI? I think even in your privateKey, the
\n
is being replaced by a space, which is the same behaviour for me but for some reason, it is not working. I tried many ways to avoid the case of some extra char and with
pulumi config set
those methods work but not with esc.
Funny thing, pulumi didn't work the first time but if I run it a second time, then it works 😄
g
yes, I created in table view. glad it's working for you now.
a
I usually store PEMs as base64 encoded strings... For setting that in ESC:
esc env set org/env --secret pulumiConfig.privateKey $(cat cert.pem | base64 | tr -d '\n\r' )
For setting that in Pulumi:
cat cert.pem | base64 | tr -d '\n\r' | pulumi config set --secret --path 'some_path.private_key