https://pulumi.com logo
#getting-started
Title
# getting-started
r

ripe-xylophone-26538

03/06/2024, 9:38 AM
Hey there, I need a way to populate a template with secrets during a pulumi run and then create a vm with this template. This means I need to resolve the secrets from pulumi and get the strings out of these secrets to populate the template with them. I've read about
.apply
using Python but don't really get it. Is there any possibility to get the raw secret from an Output-object?
Maybe someone can chime in and explain to me how you would use cloudinit with pulumi. I don't get how I can feed secrets into something like cloudinit. (I am using Flatcar with Ignition, so no cloudinit, but similar use case)
s

salmon-account-74572

03/06/2024, 8:21 PM
If you are pulling outputs from multiple resources, then you should be able to use
pulumi.all
with a format string to build out the Ignition configuration you need. I’d refer to the docs on using
pulumi.all
and similar helpers (
pulumi.jsonstringify
might help here, I’m not sure?) that assist with resolving Outputs into other formats you can use.
r

ripe-xylophone-26538

03/12/2024, 3:28 PM
sorry, but does this work for secrets?
s

salmon-account-74572

03/12/2024, 5:25 PM
I think secrets are also similar to Outputs in some respects, so…maybe? 🤣