This message was deleted.
# general
s
This message was deleted.
c
Try this:
Copy code
vpc.publicSubnetIds.apply(ids => {
  ids.forEach(id => {
     gateways[id] = vpc.addNatGateway(
        `${config.release.name}-${name}-${id}-gateway`,
        { subnet: id },
        { parent: vpc }
      );
  });
});
b
unfortunately subnetids is an array of output string not a output of string array
I need to flip the onion, but my ts foo is not that strong
c
Ah I see, how about using
pulumi.all()
?
Copy code
pulumi.all(vpc.publicSubnetIds).apply((ids) => {
  ids.forEach(id => {
     gateways[id] = vpc.addNatGateway(
        `${config.release.name}-${name}-${id}-gateway`,
        { subnet: id },
        { parent: vpc }
      );
  });
});
Did you get this working?