Skip to content

Conversation

@bregmanx
Copy link

📝 Description

What does this PR do and why is this change necessary?
This PR updates the schema validators for linode_firewall and linode_firewall_rule resources.
Previously, labels were restricted to a maximum of 32 characters. In environments where descriptive, programmatically generated labels are used, this limit can be too restrictive.
By raising the limit to 64 characters, users gain more flexibility in naming their firewall resources.

✔️ How to Test

Unit Testing

make test-unit

Integration Testing

Run the relevant firewall integration tests:

make test-int PKG_NAME=firewall
make test-int PKG_NAME=firewalls
make test-int PKG_NAME=firewallrule
make test-int PKG_NAME=firewallrules

Manual Testing

In a terraform-provider-linode sandbox environment (e.g. dx-devenv), apply the following configuration:

resource "linode_firewall" "test" {
  label = "tf-test-firewall-label-with-more-than-thirty-two-chars"
  inbound {
    action   = "ACCEPT"
    protocol = "TCP"
    ports    = "22"
    ipv4     = ["0.0.0.0/0"]
  }
  outbound {
    action   = "ACCEPT"
    protocol = "ALL"
    ipv4     = ["0.0.0.0/0"]
  }
}

resource "linode_firewall_rule" "test" {
  label       = "tf-test-firewall-rule-label-longer-than-thirty-two-chars"
  firewall_id = linode_firewall.test.id
  action      = "ACCEPT"
  protocol    = "TCP"
  ports       = "80"
  ipv4        = ["0.0.0.0/0"]
  description = "test rule with long label"
}

Steps:

  1. Run terraform apply and verify the provider accepts labels up to 64 characters.
  2. Run terraform plan again and ensure no changes are proposed.
  3. Adjust the labels above 64 characters and confirm the provider rejects them.

Relax label validation by increasing the maximum allowed length
from 32 to 64 characters for both linode_firewall and linode_firewall_rule
schemas. This change enables use of longer, more descriptive labels
when managing firewall resources via Terraform.
@bregmanx bregmanx requested a review from a team as a code owner September 28, 2025 05:44
@bregmanx bregmanx requested review from jriddle-linode and lgarber-akamai and removed request for a team September 28, 2025 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant