Created
October 16, 2020 08:46
-
-
Save jeznag/4c1972d919e34f939bd44830fcb9bbd8 to your computer and use it in GitHub Desktop.
ApplicationLoadBalancedFargateService with two SSL certs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const grafanaService = new ecs_patterns.ApplicationLoadBalancedFargateService(this, 'Grafana', { | |
cluster: this.props.ecsCluster, | |
taskDefinition: taskdef, | |
domainZone: this.props.hostedZone, | |
domainName: this.grafanaDns, | |
publicLoadBalancer: true | |
}) | |
const sslListener = grafanaService.loadBalancer.addListener('SSL', { | |
port: 443, | |
certificates: [this.props.certificateHarvestSubdomain, this.props.certificateRootSubdomain], | |
protocol: ApplicationProtocol.HTTPS | |
}) | |
sslListener.addTargets('grafanaTarget', { | |
targets: [grafanaService.service], | |
port: 80, | |
protocol: ApplicationProtocol.HTTP, | |
healthCheck: { | |
path: '/login', | |
interval: cdk.Duration.minutes(1) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment