Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
msambol committed Feb 25, 2024
1 parent 445ca3f commit 94e7171
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,13 @@ export abstract class TargetGroupBase extends Construct implements ITargetGroup
protected validateHealthCheck(): string[] {
const ret = new Array<string>();

if (this.healthCheck.interval?.toSeconds() && this.healthCheck.timeout?.toSeconds()) {
if (this.healthCheck.interval.toSeconds() < this.healthCheck.timeout.toSeconds()) {
const intervalSeconds = this.healthCheck.interval?.toSeconds();
const timeoutSeconds = this.healthCheck.timeout?.toSeconds();

if (intervalSeconds && timeoutSeconds) {
if (intervalSeconds < timeoutSeconds) {
ret.push('Health check interval must be greater than the timeout; received interval ' +
`${this.healthCheck.interval.toSeconds()}, timeout ${this.healthCheck.timeout.toSeconds()}.`);
`${intervalSeconds}, timeout ${timeoutSeconds}.`);
}
}
return ret;
Expand Down

0 comments on commit 94e7171

Please sign in to comment.