Skip to content

Commit e64bad6

Browse files
authored
feat(sg): [123456789] support protocol all (#2870)
* support protocol all * support protocol all
1 parent f5f83a9 commit e64bad6

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.changelog/2870.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_security_group_rule: Supports setting the `ip_protocol` parameter to `ALL`.
3+
```

tencentcloud/services/vpc/resource_tc_security_group_rule.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ func ResourceTencentCloudSecurityGroupRule() *schema.Resource {
6363
ConflictsWith: []string{
6464
"protocol_template",
6565
},
66-
ForceNew: true,
67-
Computed: true,
68-
ValidateFunc: tccommon.ValidateAllowedStringValueIgnoreCase([]string{"TCP", "UDP", "ICMP"}),
69-
Description: "Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `protocol_template`.",
66+
ForceNew: true,
67+
Computed: true,
68+
Description: "Type of IP protocol. Valid values: `TCP`, `UDP`, `ICMP`, `ICMPv6` and `ALL`. Default to all types protocol, and conflicts with `protocol_template`.",
7069
},
7170
"port_range": {
7271
Type: schema.TypeString,

tencentcloud/services/vpc/resource_tc_security_group_rule_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func ResourceTencentCloudSecurityGroupRuleSet() *schema.Resource {
6868
Type: schema.TypeString,
6969
Optional: true,
7070
Computed: true,
71-
Description: "Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `service_template_*`.",
71+
Description: "Type of IP protocol. Valid values: `TCP`, `UDP`, `ICMP`, `ICMPv6` and `ALL`. Default to all types protocol, and conflicts with `service_template_*`.",
7272
},
7373
"port": {
7474
Type: schema.TypeString,

website/docs/r/security_group_rule_set.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The `egress` object supports the following:
117117
* `description` - (Optional, String) Description of the security group rule.
118118
* `ipv6_cidr_block` - (Optional, String) An IPV6 address network or CIDR segment, and conflict with `source_security_id` and `address_template_*`.
119119
* `port` - (Optional, String) Range of the port. The available value can be one, multiple or one segment. E.g. `80`, `80,90` and `80-90`. Default to all ports, and conflicts with `service_template_*`.
120-
* `protocol` - (Optional, String) Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `service_template_*`.
120+
* `protocol` - (Optional, String) Type of IP protocol. Valid values: `TCP`, `UDP`, `ICMP`, `ICMPv6` and `ALL`. Default to all types protocol, and conflicts with `service_template_*`.
121121
* `service_template_group` - (Optional, String) Specify Group ID of Protocol template ID like `ppmg-xxxxxxxx`, conflict with `cidr_block` and `port`.
122122
* `service_template_id` - (Optional, String) Specify Protocol template ID like `ppm-xxxxxxxx`, conflict with `cidr_block` and `port`.
123123
* `source_security_id` - (Optional, String) ID of the nested security group, and conflicts with `cidr_block` and `address_template_*`.
@@ -131,7 +131,7 @@ The `ingress` object supports the following:
131131
* `description` - (Optional, String) Description of the security group rule.
132132
* `ipv6_cidr_block` - (Optional, String) An IPV6 address network or CIDR segment, and conflict with `source_security_id` and `address_template_*`.
133133
* `port` - (Optional, String) Range of the port. The available value can be one, multiple or one segment. E.g. `80`, `80,90` and `80-90`. Default to all ports, and conflicts with `service_template_*`.
134-
* `protocol` - (Optional, String) Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `service_template_*`.
134+
* `protocol` - (Optional, String) Type of IP protocol. Valid values: `TCP`, `UDP`, `ICMP`, `ICMPv6` and `ALL`. Default to all types protocol, and conflicts with `service_template_*`.
135135
* `service_template_group` - (Optional, String) Specify Group ID of Protocol template ID like `ppmg-xxxxxxxx`, conflict with `cidr_block` and `port`.
136136
* `service_template_id` - (Optional, String) Specify Protocol template ID like `ppm-xxxxxxxx`, conflict with `cidr_block` and `port`.
137137
* `source_security_id` - (Optional, String) ID of the nested security group, and conflicts with `cidr_block` and `address_template_*`.

0 commit comments

Comments
 (0)