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

feat: add label_match_statement to managed_rule_group_statement #60

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
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