This message was deleted.
# aws
s
This message was deleted.
l
You don't need to wrap anything using
pulumi.all
in this case.
Copy code
const publicRouteTableAssociation = new         aws.ec2.RouteTableAssociation("publicRouteTableAssociation", {
    routeTableId: publicRouteTable.id,
    subnetId: subnet_public[0].id
  });
However you need one association per subnet, so maybe you should create the associations inside the loop.
s
I’ve done it with a separate loop, but creating the association in the same loop is even better (now I need to go refactor my code!).