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

little-cartoon-10569

07/21/2022, 10:47 PM
Has anyone got an example of using
pulumi confg set --secret
with a multi-line value? I see the note that it needs to be catted (not echoed?) in via a pipe. But when I do that, only the first line is being encrypted and kept; the rest of the file is ignored.
m

miniature-musician-31262

07/21/2022, 10:51 PM
i think i cover this in my book! let me see make sure it still works 🙂
Copy code
$ echo "some                   
multi-line
string" | pulumi config set some_string --secret
Copy code
$ pulumi config get some_string    
some
multi-line
string
l

little-cartoon-10569

07/21/2022, 10:52 PM
Yea, that's what I'm doing. But then
pulumi config get some_string
is showing only "some".
m

miniature-musician-31262

07/21/2022, 10:53 PM
interesting 🤔
l

little-cartoon-10569

07/21/2022, 10:56 PM
I'm also getting this on each step:
WARN[0000] The input device is not a TTY. The --tty and --interactive flags might not work properly
Now that I think of it, it may be to do with the fact that this is containerized. Pulumi isn't running on my host machine.
m

miniature-musician-31262

07/21/2022, 10:57 PM
ah
yeah i’m no expert here, but that sounds plausible
l

little-cartoon-10569

07/21/2022, 10:58 PM
Fancy adding a chapter on all the hoops you need to jump through in order to run Pulumi without installing it (or node, or anything else...)?
It's fun!
m

miniature-musician-31262

07/21/2022, 10:59 PM
😬 😂 i actually haven’t tried that, but i should
l

little-cartoon-10569

07/21/2022, 11:01 PM
Tried removing the
-it
flags from podman. That made the above warning go away (nice), but now the value is just a newline... no "some multi-line string" any more!
Aha! Got it. I need --interactive but not --tty.
m

miniature-musician-31262

07/21/2022, 11:04 PM
oh nice! yay!
l

little-cartoon-10569

07/21/2022, 11:05 PM
Makes sense, I guess. The input is a file, not a terminal.
19 Views