Skip to content

Commit 6223d9e

Browse files
authored
docs(clb): [116968016]update-doc (#2622)
* feat(doc): update-doc * feat(doc): update-doc * feat(doc): update-doc
1 parent b22ff5d commit 6223d9e

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

.changelog/2622.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_attachment: optimization documentation
3+
```

tencentcloud/services/clb/resource_tc_clb_attachment.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
Provides a resource to create a CLB attachment.
22

3+
~> **NOTE:** This resource is designed to manage the entire set of binding relationships associated with a particular CLB (Cloud Load Balancer). As such, it does not allow the simultaneous use of this resource for the same CLB across different contexts or environments.
4+
5+
36
Example Usage
47

8+
Bind a Cvm instance
9+
```hcl
10+
resource "tencentcloud_clb_attachment" "foo" {
11+
clb_id = "lb-k2zjp9lv"
12+
listener_id = "lbl-hh141sn9"
13+
rule_id = "loc-4xxr2cy7"
14+
15+
targets {
16+
instance_id = "ins-1flbqyp8"
17+
port = 80
18+
weight = 10
19+
}
20+
}
21+
```
22+
23+
Bind multiple Cvm instances
524
```hcl
625
resource "tencentcloud_clb_attachment" "foo" {
726
clb_id = "lb-k2zjp9lv"
@@ -13,9 +32,29 @@ resource "tencentcloud_clb_attachment" "foo" {
1332
port = 80
1433
weight = 10
1534
}
35+
36+
targets {
37+
instance_id = "ins-ekloqpa1"
38+
port = 81
39+
weight = 10
40+
}
1641
}
1742
```
1843

44+
Bind backend target is ENI
45+
```hcl
46+
resource "tencentcloud_clb_attachment" "foo" {
47+
clb_id = "lb-k2zjp9lv"
48+
listener_id = "lbl-hh141sn9"
49+
rule_id = "loc-4xxr2cy7"
50+
51+
targets {
52+
eni_ip = "example-ip"
53+
port = 23
54+
weight = 50
55+
}
56+
}
57+
```
1958
Import
2059

2160
CLB attachment can be imported using the id, e.g.

website/docs/r/clb_attachment.html.markdown

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,28 @@ description: |-
1111

1212
Provides a resource to create a CLB attachment.
1313

14+
~> **NOTE:** This resource is designed to manage the entire set of binding relationships associated with a particular CLB (Cloud Load Balancer). As such, it does not allow the simultaneous use of this resource for the same CLB across different contexts or environments.
15+
1416
## Example Usage
1517

18+
### Bind a Cvm instance
19+
20+
```hcl
21+
resource "tencentcloud_clb_attachment" "foo" {
22+
clb_id = "lb-k2zjp9lv"
23+
listener_id = "lbl-hh141sn9"
24+
rule_id = "loc-4xxr2cy7"
25+
26+
targets {
27+
instance_id = "ins-1flbqyp8"
28+
port = 80
29+
weight = 10
30+
}
31+
}
32+
```
33+
34+
### Bind multiple Cvm instances
35+
1636
```hcl
1737
resource "tencentcloud_clb_attachment" "foo" {
1838
clb_id = "lb-k2zjp9lv"
@@ -24,6 +44,28 @@ resource "tencentcloud_clb_attachment" "foo" {
2444
port = 80
2545
weight = 10
2646
}
47+
48+
targets {
49+
instance_id = "ins-ekloqpa1"
50+
port = 81
51+
weight = 10
52+
}
53+
}
54+
```
55+
56+
### Bind backend target is ENI
57+
58+
```hcl
59+
resource "tencentcloud_clb_attachment" "foo" {
60+
clb_id = "lb-k2zjp9lv"
61+
listener_id = "lbl-hh141sn9"
62+
rule_id = "loc-4xxr2cy7"
63+
64+
targets {
65+
eni_ip = "example-ip"
66+
port = 23
67+
weight = 50
68+
}
2769
}
2870
```
2971

0 commit comments

Comments
 (0)