Hey there, I need a way to populate a template wit...
# getting-started
r
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
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
sorry, but does this work for secrets?
s
I think secrets are also similar to Outputs in some respects, so…maybe? 🤣