Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Properties: {
Name: cf.stackName,
SecurityGroups: [
cf.importValue(
cf.join("-", ["hotosm-network-production-production-elbs-security-group", cf.region])
)
],
Subnets: cf.split(",", cf.ref("ELBSubnets")),
Type: "application"
}
},
MLEnablerHTTPSListener: {
Type: 'AWS::ElasticLoadBalancingV2::Listener',
Properties: {
Certificates: [ {
CertificateArn: cf.arn('acm', cf.ref('SSLCertificateIdentifier'))
}],
DefaultActions: [{
Type: 'forward',
TargetGroupArn: cf.ref('MLEnablerTargetGroup')
}],
LoadBalancerArn: cf.ref('MLEnablerALB'),
Port: 443,
Protocol: 'HTTPS'
}
},
MLEnablerHTTPListener: {
Type: 'AWS::ElasticLoadBalancingV2::Listener',
Properties: {
DefaultActions: [{
Type: 'redirect',
RedirectConfig: {
HealthCheckTimeoutSeconds: 10,
HealthyThresholdCount: 3,
UnhealthyThresholdCount: 3,
Port: 8000,
Protocol: 'HTTP',
VpcId: cf.importValue(cf.join('-', ['hotosm-network-production', 'default-vpc', cf.region])),
Matcher: {
HttpCode: '200,202,302,304'
}
}
},
TaskingManagerLoadBalancerHTTPSListener: {
Type: 'AWS::ElasticLoadBalancingV2::Listener',
Properties: {
Certificates: [ {
CertificateArn: cf.arn('acm', cf.ref('SSLCertificateIdentifier'))
}],
DefaultActions: [{
Type: 'forward',
TargetGroupArn: cf.ref('TaskingManagerTargetGroup')
}],
LoadBalancerArn: cf.ref('TaskingManagerLoadBalancer'),
Port: 443,
Protocol: 'HTTPS'
}
},
TaskingManagerLoadBalancerHTTPListener: {
Type: 'AWS::ElasticLoadBalancingV2::Listener',
Properties: {
DefaultActions: [{
Type: 'redirect',
RedirectConfig: {
HealthCheckTimeoutSeconds: 10,
HealthyThresholdCount: 3,
UnhealthyThresholdCount: 3,
Port: 8000,
Protocol: 'HTTP',
VpcId: cf.importValue(cf.join('-', ['hotosm-network-production', 'default-vpc', cf.region])),
Matcher: {
HttpCode: '200,202,302,304'
}
}
},
TaskingManagerLoadBalancerHTTPSListener: {
Type: 'AWS::ElasticLoadBalancingV2::Listener',
Properties: {
Certificates: [ {
CertificateArn: cf.arn('acm', cf.ref('SSLCertificateIdentifier'))
}],
DefaultActions: [{
Type: 'forward',
TargetGroupArn: cf.ref('TaskingManagerTargetGroup')
}],
LoadBalancerArn: cf.ref('TaskingManagerLoadBalancer'),
Port: 443,
Protocol: 'HTTPS'
}
},
TaskingManagerLoadBalancerHTTPListener: {
Type: 'AWS::ElasticLoadBalancingV2::Listener',
Properties: {
DefaultActions: [{
Type: 'redirect',
RedirectConfig: {