Skip to content

Commit 037bb8c

Browse files
authored
fix(teo): [126704316] tencentcloud_teo_l7_acc_rule_v2 update doc (#3496)
* add * add
1 parent 1c2f257 commit 037bb8c

File tree

3 files changed

+65
-18
lines changed

3 files changed

+65
-18
lines changed

.changelog/3496.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_teo_l7_acc_rule_v2: update doc
3+
```

tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_v2.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
Provides a resource to create a TEO l7 acc rule
1+
Provides a resource to create a TEO l7 acc rule v2
22

33
Example Usage
44

55
```hcl
6-
resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" {
7-
zone_id = "zone-39quuimqg8r6"
8-
description = ["1"]
9-
rule_name = "网站加速1"
10-
status = "enable"
6+
resource "tencentcloud_teo_l7_acc_rule_v2" "example" {
7+
zone_id = "zone-3fkff38fyw8s"
8+
description = ["description"]
9+
rule_name = "网站加速"
10+
status = "enable"
1111
branches {
12-
condition = "$${http.request.host} in ['aaa.makn.cn']"
12+
condition = "$${http.request.host} in ['www.example.com']"
1313
actions {
1414
name = "Cache"
1515
cache_parameters {
@@ -33,6 +33,28 @@ resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" {
3333
}
3434
}
3535
36+
actions {
37+
name = "ModifyRequestHeader"
38+
modify_request_header_parameters {
39+
header_actions {
40+
action = "set"
41+
name = "EO-Client-OS"
42+
value = "*"
43+
}
44+
45+
header_actions {
46+
action = "add"
47+
name = "O-Client-Browser"
48+
value = "*"
49+
}
50+
51+
header_actions {
52+
action = "del"
53+
name = "Eo-Client-Device"
54+
}
55+
}
56+
}
57+
3658
sub_rules {
3759
description = ["1-1"]
3860
branches {
@@ -67,8 +89,8 @@ resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" {
6789

6890
Import
6991

70-
TEO l7 acc rule can be imported using the id, e.g.
92+
TEO l7 acc rule v2 can be imported using the {zone_id}#{rule_id}, e.g.
7193

7294
````
73-
terraform import tencentcloud_teo_l7_acc_rule.example ${zone_id}#${rule_id}
95+
terraform import tencentcloud_teo_l7_acc_rule_v2.example zone-3fkff38fyw8s#rule-3ft1xeuhlj1b
7496
````

website/docs/r/teo_l7_acc_rule_v2.html.markdown

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_teo_l7_acc_rule_v2"
55
sidebar_current: "docs-tencentcloud-resource-teo_l7_acc_rule_v2"
66
description: |-
7-
Provides a resource to create a TEO l7 acc rule
7+
Provides a resource to create a TEO l7 acc rule v2
88
---
99

1010
# tencentcloud_teo_l7_acc_rule_v2
1111

12-
Provides a resource to create a TEO l7 acc rule
12+
Provides a resource to create a TEO l7 acc rule v2
1313

1414
## Example Usage
1515

1616
```hcl
17-
resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" {
18-
zone_id = "zone-39quuimqg8r6"
19-
description = ["1"]
20-
rule_name = "网站加速1"
17+
resource "tencentcloud_teo_l7_acc_rule_v2" "example" {
18+
zone_id = "zone-3fkff38fyw8s"
19+
description = ["description"]
20+
rule_name = "网站加速"
2121
status = "enable"
2222
branches {
23-
condition = "$${http.request.host} in ['aaa.makn.cn']"
23+
condition = "$${http.request.host} in ['www.example.com']"
2424
actions {
2525
name = "Cache"
2626
cache_parameters {
@@ -44,6 +44,28 @@ resource "tencentcloud_teo_l7_acc_rule_v2" "teo_l7_acc_rule_v2" {
4444
}
4545
}
4646
47+
actions {
48+
name = "ModifyRequestHeader"
49+
modify_request_header_parameters {
50+
header_actions {
51+
action = "set"
52+
name = "EO-Client-OS"
53+
value = "*"
54+
}
55+
56+
header_actions {
57+
action = "add"
58+
name = "O-Client-Browser"
59+
value = "*"
60+
}
61+
62+
header_actions {
63+
action = "del"
64+
name = "Eo-Client-Device"
65+
}
66+
}
67+
}
68+
4769
sub_rules {
4870
description = ["1-1"]
4971
branches {
@@ -466,9 +488,9 @@ In addition to all arguments above, the following attributes are exported:
466488

467489
## Import
468490

469-
TEO l7 acc rule can be imported using the id, e.g.
491+
TEO l7 acc rule v2 can be imported using the {zone_id}#{rule_id}, e.g.
470492

471493
````
472-
terraform import tencentcloud_teo_l7_acc_rule.example ${zone_id}#${rule_id}
494+
terraform import tencentcloud_teo_l7_acc_rule_v2.example zone-3fkff38fyw8s#rule-3ft1xeuhlj1b
473495
````
474496

0 commit comments

Comments
 (0)