This message was deleted.
# aws
s
This message was deleted.
s
Copy code
const lb = new aws.lb.LoadBalancer("Pulumi-LB", {
  subnetMappings: [
    {
      allocationId: eip1.allocationId,
      subnetId: subnetIds[0]
    },
    {
      allocationId: eip2.allocationId,
      subnetId: subnetIds[1]
    }
  ],
  loadBalancerType: "network",
  ipAddressType: "ipv4"
})


const tg = new aws.lb.TargetGroup("datahub-tg", {
  port: 80,
  protocol: "TCP",
  vpcId: vpc.id
})

const listener = new aws.lb.Listener("datahub-listener", {
  loadBalancerArn: lb.arn,
  defaultActions: [{
    type: "forward",
    targetGroupArn: tg.arn
  }],
  port: 88,
  protocol: "TCP"
})