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

forwarded_ip_config block is not supported in geo_match_statement #8

Open
dadogmail opened this issue Sep 19, 2024 · 1 comment
Open

Comments

@dadogmail
Copy link

Description
It appears that the forwarded_ip_config block is not supported in geo_match_statement, even though the block is declared Terraform does not recognize any changes.

Steps to Reproduce
Add forwarded_ip_config block in the geo_match_statement before deploying the infrastructure.
Deploy the infrastructure using Terraform.
Observe that the rule is not configured to check the header argument does not take effect.
Modify the rule from AWS Console
Run Terraform plan and it detects a drift and tries to revert back the rule to its original state

Relevant Code Snippet

module "waf" {
source = "github.com/aws-ss/terraform-aws-wafv2"
resource_arn = [aws_lb.test_alb.arn]
name = "custom_rate_based_waf"
scope = "REGIONAL"
default_action = "allow"
{
name = "not-block-traffic-from-IT"
priority = 10
action = "block"
not_statement = {
geo_match_statement = {
country_codes : ["IT"]
forwarded_ip_config = {
header_name = "x-forwarded-for"
fallback_behavior = "MATCH"
}
}
}
visibility_config = {
cloudwatch_metrics_enabled = true
metric_name = "not-block-traffic-from-IT"
sampled_requests_enabled = true
}
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@dadogmail and others