This message was deleted.
# typescript
s
This message was deleted.
c
What is the type of
instances
? And are you wanting to write the file to your local machine?
m
instances is an array of
new aws.ec2.Instance
Yes, I want to write the file to my local machine
c
Something like this should work:
Copy code
pulumi.all(sshConfigFragments).apply(f => fs.writeFileSync("~/.ssh/config", f.join("\n\n")));
🙌 1
You'll have an array of
Output
values that you need to wait on and
pulumi.all
does that. Similar to
Promise.all
. Note that
pulumi
in my snippet is just an import alias for
@pulumi/pulumi
.
...and
fs
is an import alias for Node's native
fs
module.
m
Thanks @clever-sunset-76585! This worked!
partypus 1