Skip to content

Commit 3f9f136

Browse files
fix(clb): clb监听器后端参数提供默认值避免配置飘移
1 parent f330dfd commit 3f9f136

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

tencentcloud/resource_tc_clb_attachment.go

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
/*
22
Provides a resource to create a CLB attachment.
33
4-
Example Usage
4+
# Example Usage
55
66
```hcl
7-
resource "tencentcloud_clb_attachment" "foo" {
8-
clb_id = "lb-k2zjp9lv"
9-
listener_id = "lbl-hh141sn9"
10-
rule_id = "loc-4xxr2cy7"
11-
12-
targets {
13-
instance_id = "ins-1flbqyp8"
14-
port = 80
15-
weight = 10
16-
}
17-
}
7+
8+
resource "tencentcloud_clb_attachment" "foo" {
9+
clb_id = "lb-k2zjp9lv"
10+
listener_id = "lbl-hh141sn9"
11+
rule_id = "loc-4xxr2cy7"
12+
13+
targets {
14+
instance_id = "ins-1flbqyp8"
15+
port = 80
16+
weight = 10
17+
}
18+
}
19+
1820
```
1921
20-
Import
22+
# Import
2123
2224
CLB attachment can be imported using the id, e.g.
2325
@@ -86,11 +88,13 @@ func resourceTencentCloudClbServerAttachment() *schema.Resource {
8688
"instance_id": {
8789
Type: schema.TypeString,
8890
Optional: true,
91+
Default: "",
8992
Description: "CVM Instance Id of the backend server, conflict with `eni_ip` but must specify one of them.",
9093
},
9194
"eni_ip": {
9295
Type: schema.TypeString,
9396
Optional: true,
97+
Default: "",
9498
Description: "Eni IP address of the backend server, conflict with `instance_id` but must specify one of them.",
9599
},
96100
"port": {

0 commit comments

Comments
 (0)