Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aws-elasticloadbalancingv2): unhealthy threshold #1145

Merged
merged 2 commits into from
Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export abstract class BaseTargetGroup extends cdk.Construct implements ITargetGr
healthCheckProtocol: new cdk.Token(() => this.healthCheck && this.healthCheck.protocol),
healthCheckTimeoutSeconds: new cdk.Token(() => this.healthCheck && this.healthCheck.timeoutSeconds),
healthyThresholdCount: new cdk.Token(() => this.healthCheck && this.healthCheck.healthyThresholdCount),
unhealthyThresholdCount: new cdk.Token(() => this.healthCheck && this.healthCheck.unhealthyThresholdCount),
matcher: new cdk.Token(() => this.healthCheck && this.healthCheck.healthyHttpCodes !== undefined ? {
httpCode: this.healthCheck.healthyHttpCodes
} : undefined),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,15 @@ export = {
targets: [new FakeSelfRegisteringTarget(stack, 'Target', vpc)]
});
group.configureHealthCheck({
unhealthyThresholdCount: 3,
timeoutSeconds: 3600,
intervalSecs: 30,
path: '/test',
});

// THEN
expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', {
UnhealthyThresholdCount: 3,
HealthCheckIntervalSeconds: 30,
HealthCheckPath: "/test",
HealthCheckTimeoutSeconds: 3600,
Expand Down