resource "aws_lb" "maxffp-bo-ext" {
  #checkov:skip=CKV_AWS_328: Ensure that ALB drops HTTP headers. Migrated existing load balancer as-is.
  #checkov:skip=CKV2_AWS_28: Ensure public facing ALB are protected by WAF. Migrated existing load balancer as-is.
  desync_mitigation_mode           = "monitor"
  drop_invalid_header_fields       = false
  enable_cross_zone_load_balancing = true
  enable_deletion_protection       = true
  enable_http2                     = false
  enable_waf_fail_open             = false
  idle_timeout                     = 60
  internal                         = false
  ip_address_type                  = "ipv4"
  load_balancer_type               = "application"
  name                             = "maxffp-bo-ext"
  preserve_host_header             = false
  security_groups = [
    "sg-00992919e95b56f55",
  ]
  subnets = [
    "subnet-047ecb418f5388ce8",
    "subnet-0d6ae7dbcaa3751a4",
  ]
  tags = {
    "Business-Unit" = "EOM"
    "Environment"   = "Dev"
    "Project-Code"  = "SME-2000-0590E"
    "Project-Name"  = "Max-Dev"
  }
  tags_all = {
    "Business-Unit" = "EOM"
    "Environment"   = "Dev"
    "Project-Code"  = "SME-2000-0590E"
    "Project-Name"  = "Max-Dev"
  }

  access_logs {
    bucket  = "sme-core-cloud-compliance-centralized-lb-euc1-logs"
    enabled = true
    prefix  = "sme-supply-chain-max-prod"
  }

  subnet_mapping {
    subnet_id = "subnet-047ecb418f5388ce8"
  }
  subnet_mapping {
    subnet_id = "subnet-0d6ae7dbcaa3751a4"
  }

  timeouts {}
}

resource "aws_lb" "maxffp-boapp03" {
  #checkov:skip=CKV2_AWS_28: Ensure public facing ALB are protected by WAF. Migrated existing load balancer as-is.
  desync_mitigation_mode           = "defensive"
  drop_invalid_header_fields       = false
  enable_cross_zone_load_balancing = true
  enable_deletion_protection       = true
  enable_http2                     = true
  enable_waf_fail_open             = false
  idle_timeout                     = 60
  internal                         = false
  ip_address_type                  = "ipv4"
  load_balancer_type               = "application"
  name                             = "maxffp-boapp03"
  preserve_host_header             = false
  security_groups = [
    "sg-00992919e95b56f55",
  ]
  subnets = [
    "subnet-047ecb418f5388ce8",
    "subnet-0d6ae7dbcaa3751a4",
  ]
  tags = {
    "Business-Unit" = "EOM"
    "Environment"   = "Dev"
    "Project-Code"  = "SME-2000-0590E"
    "Project-Name"  = "Max-Dev"
  }
  tags_all = {
    "Business-Unit" = "EOM"
    "Environment"   = "Dev"
    "Project-Code"  = "SME-2000-0590E"
    "Project-Name"  = "Max-Dev"
  }

  access_logs {
    bucket  = "sme-core-cloud-compliance-centralized-lb-euc1-logs"
    enabled = true
    prefix  = "sme-supply-chain-max-prod"
  }

  subnet_mapping {
    subnet_id = "subnet-047ecb418f5388ce8"
  }
  subnet_mapping {
    subnet_id = "subnet-0d6ae7dbcaa3751a4"
  }

  timeouts {}
}

resource "aws_lb" "maxffu-boapp01-ext" {
  #checkov:skip=CKV_AWS_328: Ensure that ALB drops HTTP headers. Migrated existing load balancer as-is.
  #checkov:skip=CKV2_AWS_28: Ensure public facing ALB are protected by WAF. Migrated existing load balancer as-is.
  desync_mitigation_mode           = "monitor"
  drop_invalid_header_fields       = false
  enable_cross_zone_load_balancing = true
  enable_deletion_protection       = true
  enable_http2                     = false
  enable_waf_fail_open             = false
  idle_timeout                     = 60
  internal                         = false
  ip_address_type                  = "ipv4"
  load_balancer_type               = "application"
  name                             = "maxffu-boapp01-ext"
  preserve_host_header             = false
  security_groups = [
    "sg-00992919e95b56f55",
  ]
  subnets = [
    "subnet-047ecb418f5388ce8",
    "subnet-0d6ae7dbcaa3751a4",
  ]
  tags     = {}
  tags_all = {}

  access_logs {
    bucket  = "sme-core-cloud-compliance-centralized-lb-euc1-logs"
    enabled = true
    prefix  = "sme-supply-chain-max-prod"
  }

  subnet_mapping {
    subnet_id = "subnet-047ecb418f5388ce8"
  }
  subnet_mapping {
    subnet_id = "subnet-0d6ae7dbcaa3751a4"
  }

  timeouts {}
}

