resource "aws_network_acl" "acl-01632779b56015343" {
  # 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  = "1024"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "2"
    to_port    = "65535"
  }

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

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

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

  subnet_ids = ["subnet-07dfeb409c39c1f5a", "subnet-0d78a6a846c99354c", aws_subnet.AOMA-P1-XRDS-1A.id, aws_subnet.AOMA-P1-XRDS-1B.id]

  tags = {
    Name = "AOMA-P1-RDS-NACL"
  }

  tags_all = {
    Name = "AOMA-P1-RDS-NACL"
  }

  vpc_id = "vpc-0a464bbd199aab0d0"
}

resource "aws_network_acl" "acl-0198edf4e027989b2" {
  # 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    = "3"
    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    = "6"
    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    = "4"
    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    = "7"
    to_port    = "443"
  }

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

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

  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 = "172.34.27.0/24"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "5"
    to_port    = "0"
  }

  subnet_ids = ["subnet-0201b403500580f2d", "subnet-0307afc00ddf6113c", "subnet-035b9c513b856d65c"]

  tags = {
    Name = "AOMA-P1-PUB-NACL"
  }

  tags_all = {
    Name = "AOMA-P1-PUB-NACL"
  }

  vpc_id = "vpc-0a464bbd199aab0d0"
}

resource "aws_network_acl" "acl-03a04ee9768b6d9fc" {
  # checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets

  tags = {
    Name = "AOMA-P1-DEFAULT-NACL"
  }

  tags_all = {
    Name = "AOMA-P1-DEFAULT-NACL"
  }

  vpc_id = "vpc-0a464bbd199aab0d0"
}

resource "aws_network_acl" "acl-0c89928bbd6240d3d" {
  # 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    = "5"
    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    = "1"
    to_port    = "0"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.12.252.0/24"
    from_port  = "9094"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "19"
    to_port    = "9094"
  }

  ingress {
    action     = "allow"
    cidr_block = "10.11.186.128/25"
    from_port  = "9094"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "20"
    to_port    = "9094"
  }

  ingress {
    action     = "allow"
    cidr_block = "172.29.31.0/24"
    from_port  = "6432"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "14"
    to_port    = "6432"
  }

  ingress {
    action     = "allow"
    cidr_block = "172.34.22.0/24"
    from_port  = "9094"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "18"
    to_port    = "9094"
  }

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

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

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

  subnet_ids = ["subnet-00a38d6fca2379aa0", "subnet-01cab8cb0d3394c21", "subnet-020a9f769e5c32c0e", "subnet-02b4d3483d3fc0b63", "subnet-02bffd525f8c61d91", "subnet-0336add8a6766fb43", "subnet-05855aa4e7d99fede", "subnet-08ab4e158f16130f2", "subnet-09b490b9015c70f35", "subnet-0a399de333a51ed32", "subnet-0b2a7e54c80cd4d10"]

  tags = {
    Name = "AOMA-P1-PRV-NACL"
  }

  tags_all = {
    Name = "AOMA-P1-PRV-NACL"
  }

  vpc_id = "vpc-0a464bbd199aab0d0"
}
