sparse-intern-71089
10/08/2021, 12:44 PMswift-planet-53281
10/08/2021, 12:50 PMconst 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"
})