-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Update exclude_rule
for Deprecations, Add Custom Response Body, Allow oversize_handling
Option
#30
Conversation
/test all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bridgecrew has found errors in this PR ⬇️
/rebuild-readme |
/test all |
…esponse body option
…rm-aws-waf into allowed_managed_rules
action_to_use
allow
with Managed Rule Group Statement Rulesexclude_rule
for Deprecations, Add Custom Response Body, Allow oversize_handling
Option
…rm-aws-waf into allowed_managed_rules
/test all |
…rm-aws-waf into allowed_managed_rules
@@ -576,11 +596,29 @@ resource "aws_wafv2_web_acl" "default" { | |||
content { | |||
arn = rule_group_reference_statement.value.arn | |||
|
|||
dynamic "excluded_rule" { | |||
for_each = lookup(rule_group_reference_statement.value, "excluded_rule", null) != null ? toset(rule_group_reference_statement.value.excluded_rule) : [] | |||
dynamic "rule_action_override" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave excluded_rule
as is to prevent breaking change, and instead add new option for rule_action_override
/terratest |
name = rule_action_override.key | ||
action_to_use { | ||
dynamic "allow" { | ||
for_each = rule_action_override.value.action == "allow" ? [1] : [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails tests with "action" missing attribute in a map
dynamic "excluded_rule" { | ||
for_each = lookup(managed_rule_group_statement.value, "excluded_rule", null) != null ? toset(managed_rule_group_statement.value.excluded_rule) : [] | ||
dynamic "rule_action_override" { | ||
for_each = lookup(managed_rule_group_statement.value, "excluded_rule", null) != null ? managed_rule_group_statement.value.excluded_rule : {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for_each = lookup(managed_rule_group_statement.value, "excluded_rule", null) != null ? managed_rule_group_statement.value.excluded_rule : {} | |
for_each = lookup(managed_rule_group_statement.value, "rule_action_override", null) != null ? managed_rule_group_statement.value. rule_action_override : {} |
dynamic "excluded_rule" { | ||
for_each = lookup(rule_group_reference_statement.value, "excluded_rule", null) != null ? toset(rule_group_reference_statement.value.excluded_rule) : [] | ||
dynamic "rule_action_override" { | ||
for_each = lookup(rule_group_reference_statement.value, "excluded_rule", null) != null ? rule_group_reference_statement.value.excluded_rule : {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for_each = lookup(rule_group_reference_statement.value, "excluded_rule", null) != null ? rule_group_reference_statement.value.excluded_rule : {} | |
for_each = lookup(rule_group_reference_statement.value, "rule_action_override", null) != null ? rule_group_reference_statement.value. rule_action_override : {} |
BREAKING CHANGE This change changes the variable for
excluded_rule
in bothmanaged_rule_group_statement_rules
andrule_group_reference_statement_rules
what
exclude_rule
option formanaged_rule_group_statement_rules
oversize_handing
forsize_constraint_statement_rules
why
excluded_rule
is deprecated and instead we should be usingrule_action_override
oversize_handling
defaults toCONTINUE
. We want to set this as an optionreferences