agreeable-notebook-99278
06/12/2022, 1:00 AMstaticSite
to get to them? I.e. first I tried .all([staticSite]).apply([{id, name, defaultHostname}])
-> errorprehistoric-london-9917
06/12/2022, 7:50 PMpulumi.output(staticSite).apply(site => console.log(site.id, site.name));
agreeable-notebook-99278
06/12/2022, 8:16 PMprehistoric-london-9917
06/12/2022, 8:43 PMpulumi.output()
is a good shortcut for a number of things since most times, Pulumi resources can take pulumi.Output<T>
as inputs, it’s a way of quickly wrapping something into an Output
. I use it often for things like AWS account ID or regions, like:
new aws.something.Something({region: pulumi.output(aws.getRegion()).name, ...});
Saves you from having to wrap things in a aws.getRegion().then(…)
scenario.ancient-car-89914
06/13/2022, 4:52 AMagreeable-notebook-99278
06/14/2022, 12:44 AM.all([staticSite]).apply([{id, name, defaultHostname}])
just gives you a prototype of the object (callable functions) 🤷♂️🏻bright-horse-50102
06/14/2022, 11:03 PM.all([staticSite]).apply(([{id, name, defaultHostname}]) => {
// ...
})