|
@@ -1,33 +1,15 @@
|
|
|
-locals {
|
|
|
- blacklisted_ips = [
|
|
|
- {
|
|
|
- "value" = "172.16.0.0/16"
|
|
|
- type = "IPV4"
|
|
|
- },
|
|
|
- {
|
|
|
- "value" = "192.168.0.0/16"
|
|
|
- type = "IPV4"
|
|
|
- },
|
|
|
- {
|
|
|
- "value" = "169.254.0.0/16"
|
|
|
- type = "IPV4"
|
|
|
- },
|
|
|
- {
|
|
|
- "value" = "127.0.0.1/32"
|
|
|
- type = "IPV4"
|
|
|
- },
|
|
|
- ]
|
|
|
- waf_prefix = "portal"
|
|
|
-}
|
|
|
-
|
|
|
-module "regional_waf" {
|
|
|
- source = "../../submodules/waf_owasp_top10"
|
|
|
- waf_prefix = local.waf_prefix
|
|
|
- blacklisted_ips = local.blacklisted_ips
|
|
|
- admin_remote_ipset = var.admin_remote_ipset
|
|
|
-}
|
|
|
+module "waf" {
|
|
|
+ source = "../../submodules/wafv2"
|
|
|
|
|
|
-resource "aws_wafregional_web_acl_association" "portal_alb_waf" {
|
|
|
+ # Custom to resource
|
|
|
+ allowed_ips = [ ] # bypasses filters, so should not be needed/used unless warranted. We previously did var.admin_remote_ipset, but that seems like a bad idea
|
|
|
+ additional_blocked_ips = [ ] # NOTE: There is a standard list in the submodule
|
|
|
resource_arn = aws_alb.portal.arn
|
|
|
- web_acl_id = module.regional_waf.web_acl_id
|
|
|
+ fqdns = keys(module.public_dns_record.forward) # first entry in list will be the WAF name
|
|
|
+
|
|
|
+ # These are passed through and should be the same for module
|
|
|
+ tags = merge(var.standard_tags, var.tags)
|
|
|
+ aws_partition = var.aws_partition
|
|
|
+ aws_region = var.aws_region
|
|
|
+ aws_account_id = var.aws_account_id
|
|
|
}
|