Skip to content

tencentcloud_lighthouse_firewall_rule does not support Ipv6CidrBlock #4108

Description

@9bingyin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions