I have created a rule group, as documented here:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_rule_group
however, I have not found a way to associate it with an ALB.
I’ve tried various forms…
resource "aws_wafv2_web_acl_association" "web_acl_association_testing" {
resource_arn = aws_lb.backend.arn
# fails:
#web_acl_arn = aws_wafv2_rule_group.wafv2_mytest.arn
# fails:
#rule_group_arn = aws_wafv2_rule_group.wafv2_mytest.arn
}
There’s nothing at the aws_wafv2_web_acl_association to suggest a way:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_web_acl_association
I tried guessing there might be a resource called “aws_wafv2_rule_group_association” but no such luck.
thanks for any thoughts
Paul