sparse-intern-71089
02/17/2022, 8:11 AMlimited-rainbow-51650
02/17/2022, 8:25 AMpulumi.all([outputs]).apply(callbackFn)
.
https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#all
Starting from outputs needed for the calculation of the user data, you pass these to all
as a list, then call apply
passing it a callback function. The callback function will be invoked by Pulumi by the time the actual values of your outputs are known. The arguments to your callback function will be the actual values that you can use to calculate the user data. The value of the user data is the return value of the callback function. apply
will wrap this again in an Output
which you can then pass to the resource taking this as an Input
, e.g. an AWS EC2 resource.
Hope my explanation makes sense.great-sunset-355
02/17/2022, 10:35 AMjs-yaml
library to render the yaml.
const cloudInitYaml = pulumi.output(cloudInitConfig).apply(yaml.dump);