Skip to content

Commit a70a50d

Browse files
authoredNov 12, 2018
fix(aws-elasticloadbalancingv2): unhealthy threshold (#1145)
Fix bug where unhealthy threshold count would not be reflected in CloudFormation properties.
1 parent e9d3d93 commit a70a50d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
 

‎packages/@aws-cdk/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export abstract class BaseTargetGroup extends cdk.Construct implements ITargetGr
194194
healthCheckProtocol: new cdk.Token(() => this.healthCheck && this.healthCheck.protocol),
195195
healthCheckTimeoutSeconds: new cdk.Token(() => this.healthCheck && this.healthCheck.timeoutSeconds),
196196
healthyThresholdCount: new cdk.Token(() => this.healthCheck && this.healthCheck.healthyThresholdCount),
197+
unhealthyThresholdCount: new cdk.Token(() => this.healthCheck && this.healthCheck.unhealthyThresholdCount),
197198
matcher: new cdk.Token(() => this.healthCheck && this.healthCheck.healthyHttpCodes !== undefined ? {
198199
httpCode: this.healthCheck.healthyHttpCodes
199200
} : undefined),

‎packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts

+2
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,15 @@ export = {
287287
targets: [new FakeSelfRegisteringTarget(stack, 'Target', vpc)]
288288
});
289289
group.configureHealthCheck({
290+
unhealthyThresholdCount: 3,
290291
timeoutSeconds: 3600,
291292
intervalSecs: 30,
292293
path: '/test',
293294
});
294295

295296
// THEN
296297
expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', {
298+
UnhealthyThresholdCount: 3,
297299
HealthCheckIntervalSeconds: 30,
298300
HealthCheckPath: "/test",
299301
HealthCheckTimeoutSeconds: 3600,

0 commit comments

Comments
 (0)