Description
tencentcloud_lighthouse_firewall_rule does not expose Ipv6CidrBlock, even though the Lighthouse API returns it from DescribeFirewallRules.
This makes existing IPv6 Lighthouse firewall rules impossible to represent cleanly in Terraform/OpenTofu configuration.
Example API Response
tccli lighthouse DescribeFirewallRules returns:
{
"Protocol": "ALL",
"Port": "ALL",
"CidrBlock": "",
"Ipv6CidrBlock": "::/0",
"Action": "ACCEPT",
"FirewallRuleDescription": "ALL TCP, UDP, ICMP and GRE"
}
Current Terraform Resource Schema
tencentcloud_lighthouse_firewall_rule.firewall_rules currently supports:
protocol
port
cidr_block
action
firewall_rule_description
There is no ipv6_cidr_block.
Actual Behavior
If an existing IPv6 firewall rule is imported, the provider reads it back with an empty cidr_block.
Writing the IPv6 CIDR into cidr_block does not converge:
firewall_rules {
protocol = "ALL"
port = "ALL"
cidr_block = "::/0"
action = "ACCEPT"
firewall_rule_description = "ALL TCP, UDP, ICMP and GRE"
}
The plan still shows an in-place update:
~ firewall_rules {
+ cidr_block = "::/0"
}
Expected Behavior
The resource should support IPv6 Lighthouse firewall rules, for example:
firewall_rules {
protocol = "ALL"
port = "ALL"
ipv6_cidr_block = "::/0"
action = "ACCEPT"
firewall_rule_description = "ALL TCP, UDP, ICMP and GRE"
}
Suggested Fix
Add ipv6_cidr_block to tencentcloud_lighthouse_firewall_rule.firewall_rules and map it to the SDK field:
FirewallRule.Ipv6CidrBlock
This should be handled in create, read, update, and delete paths.
The same issue may also apply to tencentcloud_lighthouse_firewall_template, since its template rules also only expose cidr_block.
Description
tencentcloud_lighthouse_firewall_ruledoes not exposeIpv6CidrBlock, even though the Lighthouse API returns it fromDescribeFirewallRules.This makes existing IPv6 Lighthouse firewall rules impossible to represent cleanly in Terraform/OpenTofu configuration.
Example API Response
tccli lighthouse DescribeFirewallRulesreturns:{ "Protocol": "ALL", "Port": "ALL", "CidrBlock": "", "Ipv6CidrBlock": "::/0", "Action": "ACCEPT", "FirewallRuleDescription": "ALL TCP, UDP, ICMP and GRE" }Current Terraform Resource Schema
tencentcloud_lighthouse_firewall_rule.firewall_rulescurrently supports:protocolportcidr_blockactionfirewall_rule_descriptionThere is no
ipv6_cidr_block.Actual Behavior
If an existing IPv6 firewall rule is imported, the provider reads it back with an empty
cidr_block.Writing the IPv6 CIDR into
cidr_blockdoes not converge:The plan still shows an in-place update:
Expected Behavior
The resource should support IPv6 Lighthouse firewall rules, for example:
Suggested Fix
Add
ipv6_cidr_blocktotencentcloud_lighthouse_firewall_rule.firewall_rulesand map it to the SDK field:This should be handled in create, read, update, and delete paths.
The same issue may also apply to
tencentcloud_lighthouse_firewall_template, since its template rules also only exposecidr_block.