adventurous-kilobyte-12973
01/09/2019, 11:29 PMwhite-balloon-205
elasticloadbalancingv2
is ALB/NLB, not classic load balancer - I assume that's what you want?adventurous-kilobyte-12973
01/09/2019, 11:30 PMwhite-balloon-205
const listener = new aws.elasticloadbalancingv2.Listener(`${name}metabase`, {
loadBalancerArn: loadbalancer.arn,
port: 443,
protocol: "HTTPS",
certificateArn: certificate.arn,
defaultAction: {
type: "forward",
targetGroupArn: targetgroup.arn,
},
// Require the use of SSL/TLS v1.2 or higher to connect.
sslPolicy: "ELBSecurityPolicy-TLS-1-2-2017-01",
}, { parent: this, dependsOn: [certificateValidation] });
const httpRedirectListener = new aws.elasticloadbalancingv2.Listener(`${name}metabase-redirecthttp`, {
loadBalancerArn: loadbalancer.arn,
port: 80,
protocol: "HTTP",
defaultAction: {
type: "redirect",
redirect: {
protocol: "HTTPS",
port: "443",
statusCode: "HTTP_301",
},
},
}, { parent: this });
adventurous-kilobyte-12973
01/09/2019, 11:31 PMwhite-balloon-205
elasticloadbalancing
. Naming here is unfortunate overall, but aligned with what AWS APIs chose to do when ALB/NLB were introduced.