Skip to content

Commit

Permalink
Set interval on LB Target Group modification
Browse files Browse the repository at this point in the history
  • Loading branch information
mattburgess committed Nov 28, 2022
1 parent 2b1f6ed commit baff98a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/service/elbv2/target_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,11 @@ func resourceTargetGroupUpdate(d *schema.ResourceData, meta interface{}) error {
healthCheck := healthChecks[0].(map[string]interface{})

params = &elbv2.ModifyTargetGroupInput{
TargetGroupArn: aws.String(d.Id()),
HealthCheckEnabled: aws.Bool(healthCheck["enabled"].(bool)),
HealthyThresholdCount: aws.Int64(int64(healthCheck["healthy_threshold"].(int))),
UnhealthyThresholdCount: aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))),
TargetGroupArn: aws.String(d.Id()),
HealthCheckEnabled: aws.Bool(healthCheck["enabled"].(bool)),
HealthCheckIntervalSeconds: aws.Int64(int64(healthCheck["interval"].(int))),
HealthyThresholdCount: aws.Int64(int64(healthCheck["healthy_threshold"].(int))),
UnhealthyThresholdCount: aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))),
}

t := healthCheck["timeout"].(int)
Expand All @@ -686,7 +687,6 @@ func resourceTargetGroupUpdate(d *schema.ResourceData, meta interface{}) error {
}
}
params.HealthCheckPath = aws.String(healthCheck["path"].(string))
params.HealthCheckIntervalSeconds = aws.Int64(int64(healthCheck["interval"].(int)))
}
if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda {
params.HealthCheckPort = aws.String(healthCheck["port"].(string))
Expand Down

0 comments on commit baff98a

Please sign in to comment.