From 2f155bc7f29406be3f34ecd909620c870395066e Mon Sep 17 00:00:00 2001 From: Andy Price Date: Tue, 26 Nov 2024 16:13:44 +0000 Subject: [PATCH] SP-2451 - Add Shared WAF to Incident Response #minor --- terraform/loadbalancer.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/terraform/loadbalancer.tf b/terraform/loadbalancer.tf index 417296b..fb3927d 100644 --- a/terraform/loadbalancer.tf +++ b/terraform/loadbalancer.tf @@ -13,6 +13,16 @@ resource "aws_lb" "loadbalancer" { } } +resource "aws_wafv2_web_acl_association" "shared_waf" { + resource_arn = aws_lb.loadbalancer.arn + web_acl_arn = data.aws_wafv2_web_acl.shared.arn +} + +data "aws_wafv2_web_acl" "shared" { + name = "shared-${terraform.workspace}-web-acl" + scope = "REGIONAL" +} + resource "aws_lb_target_group" "tg" { name_prefix = "respon" port = 80