You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
}
},
The text was updated successfully, but these errors were encountered: