Skip to content

Comments

Allow "any" direction for firewall filter rules#92

Open
politician wants to merge 1 commit intobrowningluke:mainfrom
politician:fix/firewall-rule-direction
Open

Allow "any" direction for firewall filter rules#92
politician wants to merge 1 commit intobrowningluke:mainfrom
politician:fix/firewall-rule-direction

Conversation

@politician
Copy link

@politician politician commented Feb 12, 2026

Description

The UI let users choose Both directions for firewall rules covering both in and out, this wasn't supported in the provider, this PR fixes it.

Note: I wasn't sure if I had to update the v0 schema, I did it though.
Note 2: I used Claude to write the tests

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

Describe how you tested your changes:

  • Unit tests added/updated (optional, but encouraged)
  • Acceptance tests added/updated (mandatory)

Examples

  • Examples added/updated in examples/ directory
  • N/A - No user-facing changes

Environment

  • OPNsense version tested: 26.1.1
  • Terraform version: 1.5.7
  • OpenTofu version: 1.11.4

Checklist

  • Code follows project style guidelines
  • Documentation has been generated (make docs)
  • Code has been formatted (make fmt)
  • Supporting code has been merged and released in browningluke/opnsense-go
  • Tests pass locally & in test workflow

Add "any" as a valid direction value in the firewall filter rule schema
(both v1 and v0) and add acceptance test covering create, import, and
update with the new direction value.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Owner

@browningluke browningluke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this @politician!

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.

2 participants