Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit 8183f99

Browse files
plugin/ecs: Error if the health check interval < timeout.
1 parent cad0b21 commit 8183f99

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

builtin/aws/ecs/components/platform/aws-ecs-platform/parameters.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ parameter {
123123

124124
parameter {
125125
key = "health_check"
126-
description = "Health check settings for the app.\nThese settings configure a health check for the applicationtarget group."
126+
description = "Health check settings for the app.\nThese settings configure a health check for the application target group."
127127
type = "category"
128128
required = false
129129
}

builtin/aws/ecs/platform.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,10 @@ func (p *Platform) resourceTargetGroupCreate(
13491349
createTargetGroupInput.HealthCheckIntervalSeconds = aws.Int64(p.config.HealthCheck.Interval)
13501350
}
13511351

1352+
if *createTargetGroupInput.HealthCheckIntervalSeconds < *createTargetGroupInput.HealthCheckTimeoutSeconds {
1353+
return status.Errorf(codes.InvalidArgument, fmt.Sprintf("Health check interval cannot be shorter than the timeout"))
1354+
}
1355+
13521356
if p.config.HealthCheck.HealthyThresholdCount != 0 {
13531357
createTargetGroupInput.HealthyThresholdCount = aws.Int64(p.config.HealthCheck.HealthyThresholdCount)
13541358
} else {
@@ -3217,7 +3221,7 @@ deploy {
32173221

32183222
doc.SetField("health_check",
32193223
"Health check settings for the app.",
3220-
docs.Summary("These settings configure a health check for the application"+
3224+
docs.Summary("These settings configure a health check for the application "+
32213225
"target group."),
32223226

32233227
docs.SubFields(func(doc *docs.SubFieldDoc) {

0 commit comments

Comments
 (0)