Skip to content

Commit

Permalink
fix(aws-elasticloadbalancingv2): unhealthy threshold (#1145)
Browse files Browse the repository at this point in the history
Fix bug where unhealthy threshold count would not be reflected
in CloudFormation properties.
  • Loading branch information
rix0rrr authored Nov 12, 2018
1 parent e9d3d93 commit a70a50d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit a70a50d

Please sign in to comment.