Skip to content

Commit

Permalink
Merge pull request hashicorp#31127 from rasekoli/b-fix-wafv2-rule-act…
Browse files Browse the repository at this point in the history
…ion-override-challenge

Added WAFv2 challenge action to rule_action_override
  • Loading branch information
ewbankkit authored Aug 11, 2023
2 parents 9fce36c + 2bcc508 commit 96ac19e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .changelog/31127.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_wafv2_web_acl: Added `rule_group_reference_statement.rule_action_override.action_to_use.challenge` argument
```
9 changes: 5 additions & 4 deletions internal/service/wafv2/schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -1091,10 +1091,11 @@ func actionToUseSchema() *schema.Schema {
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"allow": allowConfigSchema(),
"block": blockConfigSchema(),
"captcha": captchaConfigSchema(),
"count": countConfigSchema(),
"allow": allowConfigSchema(),
"block": blockConfigSchema(),
"captcha": captchaConfigSchema(),
"challenge": challengeConfigSchema(),
"count": countConfigSchema(),
},
},
}
Expand Down
2 changes: 2 additions & 0 deletions internal/service/wafv2/web_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,14 @@ func TestAccWAFV2WebACL_ManagedRuleGroup_basic(t *testing.T) {
"statement.0.managed_rule_group_statement.0.rule_action_override.0.action_to_use.0.allow.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.0.action_to_use.0.block.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.0.action_to_use.0.captcha.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.0.action_to_use.0.challenge.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.0.action_to_use.0.count.#": "1",
"statement.0.managed_rule_group_statement.0.rule_action_override.0.name": "SizeRestrictions_QUERYSTRING",
"statement.0.managed_rule_group_statement.0.rule_action_override.1.action_to_use.#": "1",
"statement.0.managed_rule_group_statement.0.rule_action_override.1.action_to_use.0.allow.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.1.action_to_use.0.block.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.1.action_to_use.0.captcha.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.1.action_to_use.0.challenge.#": "0",
"statement.0.managed_rule_group_statement.0.rule_action_override.1.action_to_use.0.count.#": "1",
"statement.0.managed_rule_group_statement.0.rule_action_override.1.name": "NoUserAgent_HEADER",
"statement.0.managed_rule_group_statement.0.scope_down_statement.#": "1",
Expand Down

0 comments on commit 96ac19e

Please sign in to comment.