resource "aws_network_acl" "acl-01d6092aec9501288" {
  #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    = "2"
    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 = "10.0.0.0/8"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "5"
    to_port    = "22"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.11.116.0/26"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "1"
    to_port    = "0"
  }

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

  ingress {
    action     = "allow"
    cidr_block = "10.12.236.128/26"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "4"
    to_port    = "0"
  }

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

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

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

  subnet_ids = ["subnet-041454bd8c46c7f45", "subnet-0f07a6fe2e34af25a", aws_subnet.DX3-D1-XRDS-1A.id, aws_subnet.DX3-D1-XRDS-1B.id]

  tags = {
    Name    = "DX3-D1-APP-NACL"
    Project = "DEL"
  }

  tags_all = {
    Name    = "DX3-D1-APP-NACL"
    Project = "DEL"
  }

  vpc_id = "vpc-06422c0b4efa7a80d"
}

resource "aws_network_acl" "acl-0b9459f4b9c34c84d" {
  #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    = "7"
    to_port    = "65535"
  }

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

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

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

  ingress {
    action     = "allow"
    cidr_block = "10.11.116.0/26"
    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  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "11"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.12.236.128/26"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "10"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.249.2.0/28"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "12"
    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    = "4"
    to_port    = "22"
  }

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

  ingress {
    action     = "allow"
    cidr_block = "23.29.98.196/32"
    from_port  = "22"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "2"
    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    = "1"
    to_port    = "22"
  }

  subnet_ids = ["subnet-02160007c27956d59", "subnet-07aa229f8ff1fcadf", "subnet-091a5812e947cae27"]

  tags = {
    Name    = "DX3-D1-PUB-NACL"
    Project = "DEL"
  }

  tags_all = {
    Name    = "DX3-D1-PUB-NACL"
    Project = "DEL"
  }

  vpc_id = "vpc-06422c0b4efa7a80d"
}

resource "aws_network_acl" "acl-0f3abba78e2f2ecc6" {
  #checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets
  vpc_id = "vpc-06422c0b4efa7a80d"
}
