Skip to content

Commit

Permalink
feat: action block captcha and challenge rules supported (#80)
Browse files Browse the repository at this point in the history
* feat: action block cpatcha and chanllenge rules.

* fix: typo

* Rebase and CHANGELOG update
  • Loading branch information
rsmets authored Feb 9, 2023
1 parent 85668ca commit 345bf0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
<a name="unreleased"></a>
## [Unreleased]

- Match Pattern Headers ([#1](https://github.com/umotif-public/terraform-aws-waf-webaclv2/issues/1))
- fix: typo
- feat: action block cpatcha and chanllenge rules.
- Fix: Match Pattern Headers ([#82](https://github.com/umotif-public/terraform-aws-waf-webaclv2/issues/82))


<a name="4.0.1"></a>
Expand Down
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ resource "aws_wafv2_web_acl" "main" {
content {}
}

dynamic "captcha" {
for_each = lookup(rule.value, "action", {}) == "captcha" ? [1] : []
content {}
}

dynamic "challenge" {
for_each = lookup(rule.value, "action", {}) == "challenge" ? [1] : []
content {}
}

dynamic "block" {
for_each = lookup(rule.value, "action", {}) == "block" ? [1] : []
content {
Expand Down

0 comments on commit 345bf0a

Please sign in to comment.