Skip to content

Commit 8568d8a

Browse files
authored
fix(clb): [121687535] tencentcloud_clb_listener_rule update code (#3080)
* add * add
1 parent a81c6bc commit 8568d8a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.changelog/3080.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_rule: update code
3+
```

tencentcloud/services/clb/resource_tc_clb_listener_rule.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ func ResourceTencentCloudClbListenerRule() *schema.Resource {
9191
"health_check_port": {
9292
Type: schema.TypeInt,
9393
Optional: true,
94-
Computed: true,
9594
Description: "Customize detection related parameters. Health check port, defaults to the port of the backend service, unless you want to specify a specific port, it is recommended to leave it blank. (Applicable only to TCP/UDP listeners).",
9695
},
9796
"health_check_type": {
@@ -569,7 +568,9 @@ func resourceTencentCloudClbListenerRuleRead(d *schema.ResourceData, meta interf
569568
_ = d.Set("health_check_http_domain", instance.HealthCheck.HttpCheckDomain)
570569
_ = d.Set("health_check_http_path", instance.HealthCheck.HttpCheckPath)
571570
_ = d.Set("health_check_http_code", instance.HealthCheck.HttpCode)
572-
_ = d.Set("health_check_port", instance.HealthCheck.CheckPort)
571+
if instance.HealthCheck.CheckPort != nil {
572+
_ = d.Set("health_check_port", instance.HealthCheck.CheckPort)
573+
}
573574
_ = d.Set("health_check_type", instance.HealthCheck.CheckType)
574575
_ = d.Set("health_check_time_out", instance.HealthCheck.TimeOut)
575576
}

0 commit comments

Comments
 (0)