resource "aws_network_acl" "acl-013e51b5978e0e9cb" {
  #checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets
  vpc_id = "vpc-00cbd3af7e606b243"
}

resource "aws_network_acl" "acl-045a417f093a27cf5" {
  #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  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "2"
    to_port    = "0"
  }

  subnet_ids = ["subnet-07916f043ae96e548", "subnet-08016a53fa68678e0"]

  tags = {
    Business-unit = "Switchboard"
    Environment   = "PROD"
    Name          = "SWBD-FF-P2-APP-NACL"
    Owner         = "Robert Dewilder"
    Project-code  = "Switchboard"
    Project-name  = "Switchboard"
  }

  tags_all = {
    Business-unit = "Switchboard"
    Environment   = "PROD"
    Name          = "SWBD-FF-P2-APP-NACL"
    Owner         = "Robert Dewilder"
    Project-code  = "Switchboard"
    Project-name  = "Switchboard"
  }

  vpc_id = "vpc-00cbd3af7e606b243"
}

resource "aws_network_acl" "acl-0f76deb7ae0ea4bf2" {
  #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.0.0.0/8"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "5"
    to_port    = "0"
  }

  subnet_ids = ["subnet-074f3beed228c9e21", "subnet-0d0bf69a1096419ff", "subnet-0dd1513d380845d2b"]

  tags = {
    Business-unit = "Switchboard"
    Environment   = "PROD"
    Name          = "SWBD-FF-P2-PUB-NACL"
    Owner         = "Robert Dewilder"
    Project-code  = "Switchboard"
    Project-name  = "Switchboard"
  }

  tags_all = {
    Business-unit = "Switchboard"
    Environment   = "PROD"
    Name          = "SWBD-FF-P2-PUB-NACL"
    Owner         = "Robert Dewilder"
    Project-code  = "Switchboard"
    Project-name  = "Switchboard"
  }

  vpc_id = "vpc-00cbd3af7e606b243"
}
