diff --git a/tencentcloud/services/gaap/resource_tc_gaap_layer4_listener.go b/tencentcloud/services/gaap/resource_tc_gaap_layer4_listener.go index 3fa33bda8c..a2da938bd1 100644 --- a/tencentcloud/services/gaap/resource_tc_gaap_layer4_listener.go +++ b/tencentcloud/services/gaap/resource_tc_gaap_layer4_listener.go @@ -81,7 +81,7 @@ func ResourceTencentCloudGaapLayer4Listener() *schema.Resource { Optional: true, Default: 2, ValidateFunc: tccommon.ValidateIntegerInRange(2, 60), - Description: "Timeout of the health check response, should less than interval, default value is 2s. NOTES: Only supports listeners of `TCP` protocol and require less than `interval`.", + Description: "Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than `interval`.", }, "healthy_threshold": { Type: schema.TypeInt, @@ -215,8 +215,7 @@ func resourceTencentCloudGaapLayer4ListenerCreate(d *schema.ResourceData, m inte healthyThreshold := d.Get("healthy_threshold").(int) unhealthyThreshold := d.Get("unhealthy_threshold").(int) - // only check for TCP listener - if protocol == "TCP" && connectTimeout >= interval { + if connectTimeout >= interval { return errors.New("connect_timeout must be less than interval") } clientIPMethod := d.Get("client_ip_method").(int) diff --git a/website/docs/r/gaap_layer4_listener.html.markdown b/website/docs/r/gaap_layer4_listener.html.markdown index ebd04a2239..59267f2ad4 100644 --- a/website/docs/r/gaap_layer4_listener.html.markdown +++ b/website/docs/r/gaap_layer4_listener.html.markdown @@ -66,7 +66,7 @@ The following arguments are supported: * `check_port` - (Optional, Int) UDP origin station health check probe port. * `check_type` - (Optional, String) UDP origin server health type. PORT means check port, and PING means PING. * `client_ip_method` - (Optional, Int, ForceNew) The way the listener gets the client IP, 0 for TOA, 1 for Proxy Protocol, default value is 0. NOTES: Only supports listeners of `TCP` protocol. -* `connect_timeout` - (Optional, Int) Timeout of the health check response, should less than interval, default value is 2s. NOTES: Only supports listeners of `TCP` protocol and require less than `interval`. +* `connect_timeout` - (Optional, Int) Timeout of the health check response, should less than interval, default value is 2s. NOTES: Require less than `interval`. * `context_type` - (Optional, String) UDP source station health check port probe message type: TEXT represents text. Only used when the health check type is PORT. * `health_check` - (Optional, Bool) Indicates whether health check is enable, default value is `false`. * `healthy_threshold` - (Optional, Int) Health threshold, which indicates how many consecutive inspections are successful, the source station is determined to be healthy. Range from 1 to 10. Default value is 1.