Skip to content

Commit

Permalink
r/firewall_filter: allow use protocol, protocol_except arguments
Browse files Browse the repository at this point in the history
in from block in term block
when family is set to ethernet-switching
Fix #577
  • Loading branch information
jeremmfr committed Nov 16, 2023
1 parent aafa5f9 commit e83ba7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!-- markdownlint-disable-file MD013 MD041 -->
# changelog

BUG FIXES:

* **resource/junos_firewall_filter**: allow use `protocol` and `protocol_except` arguments in `from` block in `term` block when `family` is set to `ethernet-switching` (Fix [#577](https://github.com/jeremmfr/terraform-provider-junos/issues/577))

## v2.3.1 (November 10, 2023)

BUG FIXES:
Expand Down
4 changes: 2 additions & 2 deletions internal/providerfwk/resource_firewall_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ func (block *firewallFilterBlockTermBlockFromConfig) validateWithFamily(
)
}
if !block.Protocol.IsNull() && !bchk.InSlice(family, []string{
junos.InetW,
junos.InetW, "ethernet-switching",
}) {
resp.Diagnostics.AddAttributeError(
pathRoot.AtName("protocol"),
Expand All @@ -1490,7 +1490,7 @@ func (block *firewallFilterBlockTermBlockFromConfig) validateWithFamily(
)
}
if !block.ProtocolExcept.IsNull() && !bchk.InSlice(family, []string{
junos.InetW,
junos.InetW, "ethernet-switching",
}) {
resp.Diagnostics.AddAttributeError(
pathRoot.AtName("protocol_except"),
Expand Down

0 comments on commit e83ba7d

Please sign in to comment.