Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add REJECT action to Network Firewall rule group stateful rule actions #32746

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/32746.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_networkfirewall_rule_group: Add support for `REJECT` action in stateful rule actions
```
13 changes: 13 additions & 0 deletions internal/service/networkfirewall/rule_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,19 @@ func TestAccNetworkFirewallRuleGroup_StatefulRule_action(t *testing.T) {
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccRuleGroupConfig_statefulAction(rName, networkfirewall.StatefulActionReject),
Check: resource.ComposeTestCheckFunc(
testAccCheckRuleGroupExists(ctx, resourceName, &ruleGroup),
resource.TestCheckResourceAttr(resourceName, "rule_group.0.rules_source.0.stateful_rule.#", "1"),
resource.TestCheckResourceAttr(resourceName, "rule_group.0.rules_source.0.stateful_rule.0.action", networkfirewall.StatefulActionReject),
),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/networkfirewall_rule_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ The `rules_source_list` block supports the following arguments:

The `stateful_rule` block supports the following arguments:

* `action` - (Required) Action to take with packets in a traffic flow when the flow matches the stateful rule criteria. For all actions, AWS Network Firewall performs the specified action and discontinues stateful inspection of the traffic flow. Valid values: `ALERT`, `DROP` or `PASS`.
* `action` - (Required) Action to take with packets in a traffic flow when the flow matches the stateful rule criteria. For all actions, AWS Network Firewall performs the specified action and discontinues stateful inspection of the traffic flow. Valid values: `ALERT`, `DROP`, `PASS`, or `REJECT`.

* `header` - (Required) A configuration block containing the stateful 5-tuple inspection criteria for the rule, used to inspect traffic flows. See [Header](#header) below for details.

Expand Down