Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattburgess committed Nov 25, 2022
1 parent 092d8ce commit e3671b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion internal/service/elbv2/target_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ func ResourceTargetGroup() *schema.Resource {
StateFunc: func(v interface{}) string {
return strings.ToUpper(v.(string))
},
ValidateFunc: validation.StringInSlice(elbv2.ProtocolEnum_Values(), false),
ValidateFunc: validation.StringInSlice([]string{
elbv2.ProtocolEnumHttp,
elbv2.ProtocolEnumHttps,
elbv2.ProtocolEnumTcp,
}, true),
DiffSuppressFunc: suppressIfTargetType(elbv2.TargetTypeEnumLambda),
},
"timeout": {
Expand Down
1 change: 0 additions & 1 deletion internal/service/elbv2/target_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ port = 8081
protocol = "TCP"
matcher = "200"
`

healthCheckValid := `
interval = 10
port = 8081
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/lb_target_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The following arguments are supported:
* `matcher` (May be required) Response codes to use when checking for a healthy responses from a target. You can specify multiple values (for example, "200,202" for HTTP(s) or "0,12" for GRPC) or a range of values (for example, "200-299" or "0-99"). Required for HTTP/HTTPS/GRPC ALB. Only applies to Application Load Balancers (i.e., HTTP/HTTPS/GRPC) not Network Load Balancers (i.e., TCP).
* `path` - (May be required) Destination for the health check request. Required for HTTP/HTTPS ALB and HTTP NLB. Only applies to HTTP/HTTPS.
* `port` - (Optional) The port the load balancer uses when performing health checks on targets. Default is traffic-port.
* `protocol` - (Optional) Protocol to use to connect with the target. Defaults to `HTTP`. Not applicable when `target_type` is `lambda`.
* `protocol` - (Optional) Protocol the load balancer uses when performing health checks on targets. Must be either `TCP`, `HTTP`, or `HTTPS`. The TCP protocol is not supported for health checks if the protocol of the target group is HTTP or HTTPS. Defaults to HTTP.
* `timeout` - (optional) Amount of time, in seconds, during which no response from a target means a failed health check. The range is 2–120 seconds. For target groups with a protocol of HTTP, the default is 6 seconds. For target groups with a protocol of TCP, TLS or HTTPS, the default is 10 seconds. For target groups with a protocol of GENEVE, the default is 5 seconds. If the target type is lambda, the default is 30 seconds.
* `unhealthy_threshold` - (Optional) Number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. Defaults to 3.

Expand Down

0 comments on commit e3671b4

Please sign in to comment.