diff --git a/.changelog/2870.txt b/.changelog/2870.txt new file mode 100644 index 0000000000..c84ff24416 --- /dev/null +++ b/.changelog/2870.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_security_group_rule: Supports setting the `ip_protocol` parameter to `ALL`. +``` \ No newline at end of file diff --git a/tencentcloud/services/vpc/resource_tc_security_group_rule.go b/tencentcloud/services/vpc/resource_tc_security_group_rule.go index 320fe3e693..dd442d3608 100644 --- a/tencentcloud/services/vpc/resource_tc_security_group_rule.go +++ b/tencentcloud/services/vpc/resource_tc_security_group_rule.go @@ -63,10 +63,9 @@ func ResourceTencentCloudSecurityGroupRule() *schema.Resource { ConflictsWith: []string{ "protocol_template", }, - ForceNew: true, - Computed: true, - ValidateFunc: tccommon.ValidateAllowedStringValueIgnoreCase([]string{"TCP", "UDP", "ICMP"}), - Description: "Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `protocol_template`.", + ForceNew: true, + Computed: true, + Description: "Type of IP protocol. Valid values: `TCP`, `UDP`, `ICMP`, `ICMPv6` and `ALL`. Default to all types protocol, and conflicts with `protocol_template`.", }, "port_range": { Type: schema.TypeString, diff --git a/tencentcloud/services/vpc/resource_tc_security_group_rule_set.go b/tencentcloud/services/vpc/resource_tc_security_group_rule_set.go index 667603e34d..122f68af6b 100644 --- a/tencentcloud/services/vpc/resource_tc_security_group_rule_set.go +++ b/tencentcloud/services/vpc/resource_tc_security_group_rule_set.go @@ -68,7 +68,7 @@ func ResourceTencentCloudSecurityGroupRuleSet() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - Description: "Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `service_template_*`.", + Description: "Type of IP protocol. Valid values: `TCP`, `UDP`, `ICMP`, `ICMPv6` and `ALL`. Default to all types protocol, and conflicts with `service_template_*`.", }, "port": { Type: schema.TypeString, diff --git a/website/docs/r/security_group_rule_set.html.markdown b/website/docs/r/security_group_rule_set.html.markdown index 19e0c3c6fc..b3ff297f07 100644 --- a/website/docs/r/security_group_rule_set.html.markdown +++ b/website/docs/r/security_group_rule_set.html.markdown @@ -117,7 +117,7 @@ The `egress` object supports the following: * `description` - (Optional, String) Description of the security group rule. * `ipv6_cidr_block` - (Optional, String) An IPV6 address network or CIDR segment, and conflict with `source_security_id` and `address_template_*`. * `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_*`. -* `protocol` - (Optional, String) Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `service_template_*`. +* `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_*`. * `service_template_group` - (Optional, String) Specify Group ID of Protocol template ID like `ppmg-xxxxxxxx`, conflict with `cidr_block` and `port`. * `service_template_id` - (Optional, String) Specify Protocol template ID like `ppm-xxxxxxxx`, conflict with `cidr_block` and `port`. * `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: * `description` - (Optional, String) Description of the security group rule. * `ipv6_cidr_block` - (Optional, String) An IPV6 address network or CIDR segment, and conflict with `source_security_id` and `address_template_*`. * `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_*`. -* `protocol` - (Optional, String) Type of IP protocol. Valid values: `TCP`, `UDP` and `ICMP`. Default to all types protocol, and conflicts with `service_template_*`. +* `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_*`. * `service_template_group` - (Optional, String) Specify Group ID of Protocol template ID like `ppmg-xxxxxxxx`, conflict with `cidr_block` and `port`. * `service_template_id` - (Optional, String) Specify Protocol template ID like `ppm-xxxxxxxx`, conflict with `cidr_block` and `port`. * `source_security_id` - (Optional, String) ID of the nested security group, and conflicts with `cidr_block` and `address_template_*`.