Hey all, I'm trying to get a secret into some user...
# general
Hey all, I'm trying to get a secret into some userData (registering a gitlab runner and need to provide the registration token). Because I can't use the result of
as a string I'm having a devil of a time. Originally I was going to use Mustache to render a template, but that's out. Using pulumi.concat is gonna be really ugly if I need to concat part of the script and another part of the script around the value...anyone have an idea of how to do this? Basically I'm taking a 26 line bash script and I need to get a Pulumi secret value into the middle of it then pass it to userData on my DO droplet Pulumi object.
I would recommend using the
provider: https://www.pulumi.com/docs/reference/pkg/cloudinit/getconfig/ you'll have to use an
to build the data though
ah, didn't know that existed, thank you!
The userData takes an Input<string> so you can use the output of requireSecret, whether you go with cloudinit or a vanillia userData string.
You just need to use apply or interpolate.