Skip to content

Commit bed8eea

Browse files
authored
update clb listener (#1824)
* update clb listener * add changelog
1 parent 626861a commit bed8eea

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.changelog/1824.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_clb_listener: `health_check_http_code` support multi code
3+
```

tencentcloud/resource_tc_clb_listener.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,11 @@ func resourceTencentCloudClbListener() *schema.Resource {
262262
"health_check_http_code": {
263263
Type: schema.TypeInt,
264264
Optional: true,
265-
ValidateFunc: validateAllowedIntValue([]int{1, 2, 4, 8, 16}),
266-
Description: "HTTP health check code of TCP listener. When the value of `health_check_type` of " +
265+
ValidateFunc: validateIntegerInRange(1, 31),
266+
Description: "HTTP health check code of TCP listener, Valid value ranges: [1~31]. When the value of `health_check_type` of " +
267267
"the health check protocol is `HTTP`, this field is required. Valid values: `1`, `2`, `4`, `8`, `16`. " +
268-
"`1` means http_1xx, `2` means http_2xx, `4` means http_3xx, `8` means http_4xx, `16` means http_5xx.",
268+
"`1` means http_1xx, `2` means http_2xx, `4` means http_3xx, `8` means http_4xx, `16` means http_5xx." +
269+
"If you want multiple return codes to indicate health, need to add the corresponding values.",
269270
},
270271
"health_check_http_path": {
271272
Type: schema.TypeString,

website/docs/r/clb_listener.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ The following arguments are supported:
162162
* `certificate_ssl_mode` - (Optional, String) Type of certificate. Valid values: `UNIDIRECTIONAL`, `MUTUAL`. NOTES: Only supports listeners of `HTTPS` and `TCP_SSL` protocol and must be set when it is available.
163163
* `health_check_context_type` - (Optional, String) Health check protocol. When the value of `health_check_type` of the health check protocol is `CUSTOM`, this field is required, which represents the input format of the health check. Valid values: `HEX`, `TEXT`.
164164
* `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 for 3 consecutive times, the backend CVM is identified as healthy. 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.
165-
* `health_check_http_code` - (Optional, Int) HTTP health check code of TCP listener. When the value of `health_check_type` of the health check protocol is `HTTP`, this field is required. Valid values: `1`, `2`, `4`, `8`, `16`. `1` means http_1xx, `2` means http_2xx, `4` means http_3xx, `8` means http_4xx, `16` means http_5xx.
165+
* `health_check_http_code` - (Optional, Int) HTTP health check code of TCP listener, Valid value ranges: [1~31]. When the value of `health_check_type` of the health check protocol is `HTTP`, this field is required. Valid values: `1`, `2`, `4`, `8`, `16`. `1` means http_1xx, `2` means http_2xx, `4` means http_3xx, `8` means http_4xx, `16` means http_5xx.If you want multiple return codes to indicate health, need to add the corresponding values.
166166
* `health_check_http_domain` - (Optional, String) HTTP health check domain of TCP listener.
167167
* `health_check_http_method` - (Optional, String) HTTP health check method of TCP listener. Valid values: `HEAD`, `GET`.
168168
* `health_check_http_path` - (Optional, String) HTTP health check path of TCP listener.

0 commit comments

Comments
 (0)