From 4b56a7315336596dfafcb1dfd8a32772bbdafd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=BCven?= Date: Wed, 3 Jan 2018 18:24:22 +0100 Subject: [PATCH] fix lb_target_group health check inconsistencies (#2580) * path defaults to "/" and validate function checks for "/" prefix * timeout doc reflects the actual default in code --- aws/resource_aws_lb_target_group.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_lb_target_group.go b/aws/resource_aws_lb_target_group.go index 21826891d42..0e4a6622bc9 100644 --- a/aws/resource_aws_lb_target_group.go +++ b/aws/resource_aws_lb_target_group.go @@ -395,6 +395,10 @@ func validateAwsLbTargetGroupHealthCheckPath(v interface{}, k string) (ws []stri errors = append(errors, fmt.Errorf( "%q cannot be longer than 1024 characters: %q", k, value)) } + if !strings.HasPrefix(value, "/") { + errors = append(errors, fmt.Errorf( + "%q must begin with a '/' character: %q", k, value)) + } return }