diff --git a/.changelog/2952.txt b/.changelog/2952.txt new file mode 100644 index 0000000000..de96a3c17f --- /dev/null +++ b/.changelog/2952.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_clb_listener_rule: support set `GRPC` and `GRPCS` +``` \ No newline at end of file diff --git a/tencentcloud/services/clb/extension_clb.go b/tencentcloud/services/clb/extension_clb.go index 2eedc1f678..60a00b12c0 100644 --- a/tencentcloud/services/clb/extension_clb.go +++ b/tencentcloud/services/clb/extension_clb.go @@ -67,6 +67,7 @@ const ( HEALTH_CHECK_TYPE_HTTP = "HTTP" HEALTH_CHECK_TYPE_HTTPS = "HTTPS" HEALTH_CHECK_TYPE_GRPC = "GRPC" + HEALTH_CHECK_TYPE_GRPCS = "GRPCS" ) var HEALTH_CHECK_TYPE = []string{ @@ -76,6 +77,7 @@ var HEALTH_CHECK_TYPE = []string{ HEALTH_CHECK_TYPE_HTTP, HEALTH_CHECK_TYPE_HTTPS, HEALTH_CHECK_TYPE_GRPC, + HEALTH_CHECK_TYPE_GRPCS, } const ( diff --git a/tencentcloud/services/clb/resource_tc_clb_listener_rule.go b/tencentcloud/services/clb/resource_tc_clb_listener_rule.go index d2e4e97452..4cdaf800c9 100644 --- a/tencentcloud/services/clb/resource_tc_clb_listener_rule.go +++ b/tencentcloud/services/clb/resource_tc_clb_listener_rule.go @@ -93,7 +93,7 @@ func ResourceTencentCloudClbListenerRule() *schema.Resource { Optional: true, Computed: true, ValidateFunc: tccommon.ValidateAllowedStringValue(HEALTH_CHECK_TYPE), - Description: "Type of health check. Valid value is `CUSTOM`, `TCP`, `HTTP`.", + Description: "Type of health check. Valid value is `CUSTOM`, `PING`, `TCP`, `HTTP`, `HTTPS`, `GRPC`, `GRPCS`.", }, "health_check_time_out": { Type: schema.TypeInt, @@ -176,8 +176,8 @@ func ResourceTencentCloudClbListenerRule() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: tccommon.ValidateAllowedStringValue([]string{"HTTP", "HTTPS", "TRPC"}), - Description: "Forwarding protocol between the CLB instance and real server. Valid values: `HTTP`, `HTTPS`, `TRPC`. The default is `HTTP`.", + ValidateFunc: tccommon.ValidateAllowedStringValue([]string{"HTTP", "HTTPS", "GRPC", "GRPCS", "TRPC"}), + Description: "Forwarding protocol between the CLB instance and real server. Valid values: `HTTP`, `HTTPS`, `GRPC`, `GRPCS`, `TRPC`. The default is `HTTP`.", }, "quic": { Type: schema.TypeBool, diff --git a/website/docs/r/clb_listener_rule.html.markdown b/website/docs/r/clb_listener_rule.html.markdown index 8cd1fc4670..c52bc51e7c 100644 --- a/website/docs/r/clb_listener_rule.html.markdown +++ b/website/docs/r/clb_listener_rule.html.markdown @@ -71,7 +71,7 @@ The following arguments are supported: * `certificate_ssl_mode` - (Optional, String, ForceNew) Type of certificate. Valid values: `UNIDIRECTIONAL`, `MUTUAL`. NOTES: Only supports listeners of HTTPS protocol. * `domain` - (Optional, String) Domain name of the listener rule. Single domain rules are passed to `domain`, and multi domain rules are passed to `domains`. * `domains` - (Optional, List: [`String`], ForceNew) Domain name list of the listener rule. Single domain rules are passed to `domain`, and multi domain rules are passed to `domains`. -* `forward_type` - (Optional, String) Forwarding protocol between the CLB instance and real server. Valid values: `HTTP`, `HTTPS`, `TRPC`. The default is `HTTP`. +* `forward_type` - (Optional, String) Forwarding protocol between the CLB instance and real server. Valid values: `HTTP`, `HTTPS`, `GRPC`, `GRPCS`, `TRPC`. The default is `HTTP`. * `health_check_health_num` - (Optional, Int) Health threshold of health check, and the default is `3`. If a success result is returned for the health check 3 consecutive times, indicates that the forwarding is normal. The value range is [2-10]. NOTES: TCP/UDP/TCP_SSL listener allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`. * `health_check_http_code` - (Optional, Int) HTTP Status Code. The default is 31. Valid value ranges: [1~31]. `1 means the return value '1xx' is health. `2` means the return value '2xx' is health. `4` means the return value '3xx' is health. `8` means the return value '4xx' is health. 16 means the return value '5xx' is health. If you want multiple return codes to indicate health, need to add the corresponding values. NOTES: The 'HTTP' health check of the 'TCP' listener only supports specifying one health check status code. NOTES: Only supports listeners of 'HTTP' and 'HTTPS' protocol. * `health_check_http_domain` - (Optional, String) Domain name of health check. NOTES: Only supports listeners of `HTTP` and `HTTPS` protocol. @@ -80,7 +80,7 @@ The following arguments are supported: * `health_check_interval_time` - (Optional, Int) Interval time of health check. Valid value ranges: (2~300) sec. and the default is `5` sec. NOTES: TCP/UDP/TCP_SSL listener allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`. * `health_check_switch` - (Optional, Bool) Indicates whether health check is enabled. * `health_check_time_out` - (Optional, Int) Time out of health check. The value range is [2-60](SEC). -* `health_check_type` - (Optional, String) Type of health check. Valid value is `CUSTOM`, `TCP`, `HTTP`. +* `health_check_type` - (Optional, String) Type of health check. Valid value is `CUSTOM`, `PING`, `TCP`, `HTTP`, `HTTPS`, `GRPC`, `GRPCS`. * `health_check_unhealth_num` - (Optional, Int) Unhealthy threshold of health check, and the default is `3`. If the unhealthy result is returned 3 consecutive times, indicates that the forwarding is abnormal. The value range is [2-10]. NOTES: TCP/UDP/TCP_SSL listener allows direct configuration, HTTP/HTTPS listener needs to be configured in `tencentcloud_clb_listener_rule`. * `http2_switch` - (Optional, Bool) Indicate to apply HTTP2.0 protocol or not. * `quic` - (Optional, Bool) Whether to enable QUIC. Note: QUIC can be enabled only for HTTPS domain names.