Skip to content

Commit

Permalink
feat: add label_match_statement to managed_rule_group_statement (#60)
Browse files Browse the repository at this point in the history
* feat: add label_match_statement to managed_rule_group_statement

* chore: update changelog + readme
  • Loading branch information
yuvalhnoga authored May 26, 2022
1 parent 959daf9 commit e531012
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
args: ['--allow-missing-credentials']
- id: trailing-whitespace
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.71.0
rev: v1.72.1
hooks:
- id: terraform_fmt
- id: terraform_docs
Expand Down
35 changes: 18 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,14 @@ All notable changes to this project will be documented in this file.
<a name="unreleased"></a>
## [Unreleased]

- [Variable] typo fix.
- [refactor] response_key to custom_response_body_key to better match underlying tf resource.
- [Examples] typo fix.
- [Custom Response] block variable input.
- [Examples] fix.
- [Custom Response Bodies] supported for multiplexed custom body definitions. Dropped the enabled variable as not needed.
- [README] updated to list custom responses capabilities.
- [make] changelog
- [make] validate.
- [Formatting] main.tf
- [Custom Response] handling on per rules basis with dynamic block definitions.
- [Formatting]
- [Variable] definition typo in type fix.
- [README] updated with input info.
- [Block] custom_response http status code.
- feat: add label_match_statement to managed_rule_group_statement


<a name="3.8.0"></a>
## [3.8.0] - 2022-05-18

- feat: add label_match_statement & rule_labels ([#58](https://github.com/umotif-public/terraform-aws-waf-webaclv2/issues/58))
- Custom Block Response ([#56](https://github.com/umotif-public/terraform-aws-waf-webaclv2/issues/56))


<a name="3.7.3"></a>
Expand All @@ -46,6 +39,12 @@ All notable changes to this project will be documented in this file.
- Added support for forwarded_ip_config inside of geo_match_statement ([#49](https://github.com/umotif-public/terraform-aws-waf-webaclv2/issues/49))


<a name="3.6.0-patch-1"></a>
## [3.6.0-patch-1] - 2022-03-22

- Added support for forwarded_ip_config inside of geo_match_statement


<a name="3.6.0"></a>
## [3.6.0] - 2022-02-21

Expand Down Expand Up @@ -201,11 +200,13 @@ All notable changes to this project will be documented in this file.
- Initial commit


[Unreleased]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.7.3...HEAD
[Unreleased]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.8.0...HEAD
[3.8.0]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.7.3...3.8.0
[3.7.3]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.7.2...3.7.3
[3.7.2]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.7.1...3.7.2
[3.7.1]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.7.0...3.7.1
[3.7.0]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.6.0...3.7.0
[3.7.0]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.6.0-patch-1...3.7.0
[3.6.0-patch-1]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.6.0...3.6.0-patch-1
[3.6.0]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.5.0...3.6.0
[3.5.0]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.4.0...3.5.0
[3.4.0]: https://github.com/umotif-public/terraform-aws-waf-webaclv2/compare/3.3.0...3.4.0
Expand Down
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,15 @@ resource "aws_wafv2_web_acl" "main" {
}
}
}

# Scope down label_match_statement
dynamic "label_match_statement" {
for_each = length(lookup(scope_down_statement.value, "label_match_statement", {})) == 0 ? [] : [lookup(scope_down_statement.value, "label_match_statement", {})]
content {
key = lookup(label_match_statement.value, "key")
scope = lookup(label_match_statement.value, "scope")
}
}
}
}
}
Expand Down

0 comments on commit e531012

Please sign in to comment.