resource "aws_network_acl" "acl-004e46f3f8315f317" {
  # checkov:skip=CKV2_AWS_1:Ensure that all NACL are attached to subnets
  vpc_id = "vpc-071995abcfc106bd5"

  tags = {
    Business-unit = "GRPS"
    Environment   = "DEV"
    Name          = "GRPSNV-D3-DEFAULT-NACL"
    Owner         = "Richard Mayer"
    Project-code  = "SME-2000-0497G"
    Project-name  = "RDX"
  }
}

resource "aws_network_acl" "acl-01d323a9ba1afa329" {
  # 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    = "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 = "0.0.0.0/0"
    from_port  = "443"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "4"
    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    = "5"
    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    = "6"
    to_port    = "0"
  }

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

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

  subnet_ids = ["subnet-02bf9031b919d05ed", "subnet-05c993a63978c127d", "subnet-08137e3aaeb9e5ab7", "subnet-0b798708cb146a155", "subnet-0df7af3746daba8ad", "subnet-0f16e2315a457aca9", aws_subnet.GRPSNV-D3-XEKS-251-1A.id, aws_subnet.GRPSNV-D3-XEKS-251-1B.id]

  tags = {
    Business-unit = "GRPS"
    Environment   = "DEV"
    Name          = "GRPSNV-D3-APP-NACL"
    Owner         = "Richard Mayer"
    Project-code  = "SME-2000-0497G"
    Project-name  = "RDX"
  }

  tags_all = {
    Business-unit = "GRPS"
    Environment   = "DEV"
    Name          = "GRPSNV-D3-APP-NACL"
    Owner         = "Richard Mayer"
    Project-code  = "SME-2000-0497G"
    Project-name  = "RDX"
  }

  vpc_id = "vpc-071995abcfc106bd5"
}

resource "aws_network_acl" "acl-0ab7b5b1229d16953" {
  # 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    = "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 = "162.49.0.0/16"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "4"
    to_port    = "0"
  }

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

  subnet_ids = ["subnet-037db2953f7b37f49", "subnet-0d88e07cd690783ed"]

  tags = {
    Business-unit = "GRPS"
    Environment   = "DEV"
    Name          = "GRPSNV-D3-RDS-NACL"
    Owner         = "Richard Mayer"
    Project-code  = "SME-2000-0497G"
    Project-name  = "RDX"
  }

  tags_all = {
    Business-unit = "GRPS"
    Environment   = "DEV"
    Name          = "GRPSNV-D3-RDS-NACL"
    Owner         = "Richard Mayer"
    Project-code  = "SME-2000-0497G"
    Project-name  = "RDX"
  }

  vpc_id = "vpc-071995abcfc106bd5"
}

resource "aws_network_acl" "acl-0e35c27fbd616a034" {
  # 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    = "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 = "0.0.0.0/0"
    from_port  = "443"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "4"
    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    = "5"
    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    = "6"
    to_port    = "0"
  }

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

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

  subnet_ids = ["subnet-046eabac937ad21fb", "subnet-05f8aa51d67767afe", "subnet-0ab02d79b53b91d29"]

  tags = {
    Business-unit = "GRPS"
    Environment   = "DEV"
    Name          = "GRPSNV-D3-PUB-NACL"
    Owner         = "Richard Mayer"
    Project-code  = "SME-2000-0497G"
    Project-name  = "RDX"
  }

  tags_all = {
    Business-unit = "GRPS"
    Environment   = "DEV"
    Name          = "GRPSNV-D3-PUB-NACL"
    Owner         = "Richard Mayer"
    Project-code  = "SME-2000-0497G"
    Project-name  = "RDX"
  }

  vpc_id = "vpc-071995abcfc106bd5"
}

