Skip to content

Commit

Permalink
Merge pull request #4420 from LordCrocket/master
Browse files Browse the repository at this point in the history
Change ECS service maximum grace time to 7200 seconds
  • Loading branch information
bflad authored May 2, 2018
2 parents e028ab4 + f4c0abf commit 8b400a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions aws/resource_aws_ecs_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,8 @@ func parseTaskDefinition(taskDefinition string) (string, string, error) {

func validateAwsEcsServiceHealthCheckGracePeriodSeconds(v interface{}, k string) (ws []string, errors []error) {
value := v.(int)
if (value < 0) || (value > 1800) {
errors = append(errors, fmt.Errorf("%q must be between 0 and 1800", k))
if (value < 0) || (value > 7200) {
errors = append(errors, fmt.Errorf("%q must be between 0 and 7200", k))
}
return
}
6 changes: 3 additions & 3 deletions aws/resource_aws_ecs_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ func TestAccAWSEcsService_healthCheckGracePeriodSeconds(t *testing.T) {
{
Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName,
roleName, policyName, tgName, lbName, svcName, -1),
ExpectError: regexp.MustCompile(`must be between 0 and 1800`),
ExpectError: regexp.MustCompile(`must be between 0 and 7200`),
},
{
Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName,
roleName, policyName, tgName, lbName, svcName, 1801),
ExpectError: regexp.MustCompile(`must be between 0 and 1800`),
roleName, policyName, tgName, lbName, svcName, 7201),
ExpectError: regexp.MustCompile(`must be between 0 and 7200`),
},
{
Config: testAccAWSEcsService_healthCheckGracePeriodSeconds(vpcNameTag, clusterName, tdName,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/ecs_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The following arguments are supported:
* `deployment_minimum_healthy_percent` - (Optional) The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
* `placement_strategy` - (Optional) **Deprecated**, use `ordered_placement_strategy` instead.
* `ordered_placement_strategy` - (Optional) Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of `placement_strategy` blocks is `5`. Defined below.
* `health_check_grace_period_seconds` - (Optional) Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 1800. Only valid for services configured to use load balancers.
* `health_check_grace_period_seconds` - (Optional) Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers.
* `load_balancer` - (Optional) A load balancer block. Load balancers documented below.
* `placement_constraints` - (Optional) rules that are taken into consideration during task placement. Maximum number of
`placement_constraints` is `10`. Defined below.
Expand Down

0 comments on commit 8b400a6

Please sign in to comment.