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

Implement cdpt-ifs-production AWS Shield Advanced through code #7761

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}