Skip to content

Commit

Permalink
Merge pull request #7761 from ministryofjustice/feature/7185-cdpt-ifs…
Browse files Browse the repository at this point in the history
…-shield-production

Implement `cdpt-ifs-production` AWS Shield Advanced through code
  • Loading branch information
roncitrus authored Sep 13, 2024
2 parents 02a47e6 + ea4b06d commit eb70661
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions terraform/environments/cdpt-ifs/shield.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module "shield" {
source = "../../modules/shield_advanced"
for_each = local.is-production ? { "build" = true } : {}
providers = {
aws.modernisation-platform = aws.modernisation-platform
}
application_name = local.application_name
resources = {
format("%s-alb", local.application_name) = {
action = "count"
arn = module.lb_access_logs_enabled.load_balancer_arn
}
}
waf_acl_rules = {
example = {
"action" = "count",
"name" = "ddos-protection",
"priority" = 0,
"threshold" = "250"
}
}
}

import {
for_each = local.is-production ? { "build" = true } : {}
id = "1302dec0-8c83-45ba-a371-0b1599aac5ed/FMManagedWebACLV2-shield_advanced_auto_remediate-1701773787672/REGIONAL"
to = module.shield["build"].aws_wafv2_web_acl.main
}

0 comments on commit eb70661

Please sign in to comment.