resource "aws_network_acl" "acl-0641009d6f8c7c270" {
  #checkov:skip=CKV_AWS_231: Ensure no NACL allow ingress from 0.0.0.0:0 to port 3389
  egress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "9"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "17"
    rule_no    = "6"
    to_port    = "65535"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "1024"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "2"
    to_port    = "65535"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.0.0.0/8"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "3"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "172.34.13.128/25"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "9"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.11.176.192/27"
    from_port  = "443"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "10"
    to_port    = "443"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "443"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "11"
    to_port    = "443"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "80"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "12"
    to_port    = "80"
  }

  subnet_ids = ["subnet-0432e7542e3fc2339", "subnet-0f5109899cdb7b00e", "subnet-0df327b32edea490b", "subnet-07bcc6a2aeac66f81", "subnet-15b2037d", "subnet-6f13d715", aws_subnet.DEL-S2-XEKS-1A.id, aws_subnet.DEL-S2-XEKS-1B.id]

  tags = {
    Name = "DEL-S2-APP-ACL"
  }

  tags_all = {
    Name = "DEL-S2-APP-ACL"
  }

  vpc_id = "vpc-bbd725d3"
}

resource "aws_network_acl" "acl-09c3bf80cd20c64c3" {
  #checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets
  #checkov:skip=CKV_AWS_231: Ensure no NACL allow ingress from 0.0.0.0:0 to port 3389
  egress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "100"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "17"
    rule_no    = "3"
    to_port    = "65535"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "1024"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "4"
    to_port    = "65535"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.0.0.0/8"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "2"
    to_port    = "0"
  }

  subnet_ids = ["subnet-05031cd353c519cb8", "subnet-0eb9833b565c4f964", "subnet-4913d733", "subnet-f4b2039c"]

  tags = {
    Name = "DEL-S2-RDS-ACL"
  }

  tags_all = {
    Name = "DEL-S2-RDS-ACL"
  }

  vpc_id = "vpc-bbd725d3"
}

resource "aws_network_acl" "acl-0bcc2a8a0a4a8768d" {
  #checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets
  #checkov:skip=CKV_AWS_231: Ensure no NACL allow ingress from 0.0.0.0:0 to port 3389
  egress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "1"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "17"
    rule_no    = "4"
    to_port    = "65535"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "1024"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "3"
    to_port    = "65535"
  }

  ingress {
    action     = "allow"
    cidr_block = "0.0.0.0/0"
    from_port  = "443"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "13"
    to_port    = "443"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.0.0.0/8"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "2"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "162.49.0.0/16"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "8"
    to_port    = "22"
  }

  ingress {
    action     = "allow"
    cidr_block = "172.34.13.128/25"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "6"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "23.29.98.196/32"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "9"
    to_port    = "22"
  }

  ingress {
    action     = "allow"
    cidr_block = "4.15.150.129/32"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "7"
    to_port    = "22"
  }

  ingress {
    action     = "allow"
    cidr_block = "52.59.68.189/32"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "5"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "35.159.2.37/32"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "16"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "54.93.219.137/32"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "10"
    to_port    = "22"
  }

  ingress {
    action     = "allow"
    cidr_block = "69.127.97.32/32"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "11"
    to_port    = "22"
  }

  ingress {
    action     = "allow"
    cidr_block = "72.226.66.52/32"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "12"
    to_port    = "22"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.250.3.64/27"
    from_port  = "2049"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "15"
    to_port    = "2049"
  }

  subnet_ids = ["subnet-07d99253cddc3dab2", "subnet-3113d74b", "subnet-c4b203ac"]

  tags = {
    Name = "DEL-S2-XDMZ-NACL"
  }

  tags_all = {
    Name = "DEL-S2-XDMZ-NACL"
  }

  vpc_id = "vpc-bbd725d3"
}

resource "aws_network_acl" "acl-35f82e5d" {
  #checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets
  tags = {
    App           = "Delivery"
    Business-unit = "Delivery-Services"
    Environment   = "stage"
    Name          = "DEL-S2-DEFAULT-NACL"
    Owner         = "Robert Dewilder"
    Project-code  = "SME - 2000-0306B"
  }

  tags_all = {
    App           = "Delivery"
    Business-unit = "Delivery-Services"
    Environment   = "stage"
    Name          = "DEL-S2-DEFAULT-NACL"
    Owner         = "Robert Dewilder"
    Project-code  = "SME - 2000-0306B"
  }

  vpc_id = "vpc-bbd725d3"
}
