resource "aws_network_acl" "acl-02ff1e975b648be26" {
  #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    = "2"
    to_port    = "443"
  }

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

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

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

  subnet_ids = ["subnet-09a02850299bb13f7", "subnet-0b3203acfc4bb3bef", "subnet-0c276d6ceb1be71de"]

  tags = {
    Business-unit = "AMP Digital Archive"
    Environment   = "STAGE2"
    Name          = "AMP-DIGARCH-S-PUB-NACL"
    Owner         = "Nathaniel Lovett"
    Project-code  = "SME-AMP"
    Project-name  = "AMP"
  }

  tags_all = {
    Business-unit = "AMP Digital Archive"
    Environment   = "STAGE2"
    Name          = "AMP-DIGARCH-S-PUB-NACL"
    Owner         = "Nathaniel Lovett"
    Project-code  = "SME-AMP"
    Project-name  = "AMP"
  }

  vpc_id = "vpc-0f6df98187a6350e1"
}

resource "aws_network_acl" "acl-0754d04d256931123" {
  #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    = "8"
    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    = "6"
    to_port    = "65535"
  }

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

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

  subnet_ids = ["subnet-0457ec604673407d3"]

  tags = {
    Business-unit = "AMP Digital Archive"
    Environment   = "STAGE2"
    Name          = "AMP-DIGARCH-S-RDS-NACL"
    Owner         = "Nathaniel Lovett"
    Project-code  = "SME-AMP"
    Project-name  = "AMP"
  }

  tags_all = {
    Business-unit = "AMP Digital Archive"
    Environment   = "STAGE2"
    Name          = "AMP-DIGARCH-S-RDS-NACL"
    Owner         = "Nathaniel Lovett"
    Project-code  = "SME-AMP"
    Project-name  = "AMP"
  }

  vpc_id = "vpc-0f6df98187a6350e1"
}

resource "aws_network_acl" "acl-0a778733de1b0ea80" {
  #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    = "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    = "5"
    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    = "2"
    to_port    = "22"
  }

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

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

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

  subnet_ids = ["subnet-0c2c6c1e04e6c56d9"]

  tags = {
    Business-unit = "AMP Digital Archive"
    Environment   = "STAGE2"
    Name          = "AMP-DIGARCH-S-APP-NACL"
    Owner         = "Nathaniel Lovett"
    Project-code  = "SME-AMP"
    Project-name  = "AMP"
  }

  tags_all = {
    Business-unit = "AMP Digital Archive"
    Environment   = "STAGE2"
    Name          = "AMP-DIGARCH-S-APP-NACL"
    Owner         = "Nathaniel Lovett"
    Project-code  = "SME-AMP"
    Project-name  = "AMP"
  }

  vpc_id = "vpc-0f6df98187a6350e1"
}

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