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

  ingress {
    action     = "allow"
    cidr_block = "162.49.0.0/16"
    from_port  = "443"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "9"
    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    = "10"
    to_port    = "443"
  }

  ingress {
    action     = "allow"
    cidr_block = "172.34.19.32/28"
    from_port  = "443"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "6"
    rule_no    = "11"
    to_port    = "443"
  }

  subnet_ids = ["subnet-00aa451faa8767524", "subnet-02faa5c46d7c6fbb5", "subnet-03cdb6356d2f7f8d2", "subnet-04464f4ff3365685f", "subnet-05035ecea4682504e", "subnet-0d58156e05cba9149", "subnet-0f6e7949c62a787ff", "subnet-0fde6cbbd9c7d8d4f"]

  tags = {
    Business-unit = "Media Conversion"
    Environment   = "DEV"
    Name          = "AMP-AAS-D2-APP-NACL"
    Owner         = "Nat Lovett"
    Project-code  = "AMP"
    Project-name  = "Asset_Service"
  }

  tags_all = {
    Business-unit = "Media Conversion"
    Environment   = "DEV"
    Name          = "AMP-AAS-D2-APP-NACL"
    Owner         = "Nat Lovett"
    Project-code  = "AMP"
    Project-name  = "Asset_Service"
  }

  vpc_id = "vpc-0288bd1df33f9a19e"
}

resource "aws_network_acl" "acl-09a9c57eda17f60f3" {
  #checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets
  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 = "10.0.0.0/8"
    from_port  = "0"
    icmp_code  = "0"
    icmp_type  = "0"
    protocol   = "-1"
    rule_no    = "7"
    to_port    = "0"
  }

  subnet_ids = ["subnet-0382de73643c2dc25", "subnet-0c1475ffb2da40afc"]

  tags = {
    Business-unit = "Media Conversion"
    Environment   = "DEV"
    Name          = "AMP-AAS-D2-RDS-NACL"
    Owner         = "Nat Lovett"
    Project-code  = "AMP"
    Project-name  = "Asset_Service"
  }

  tags_all = {
    Business-unit = "Media Conversion"
    Environment   = "DEV"
    Name          = "AMP-AAS-D2-RDS-NACL"
    Owner         = "Nat Lovett"
    Project-code  = "AMP"
    Project-name  = "Asset_Service"
  }

  vpc_id = "vpc-0288bd1df33f9a19e"
}

resource "aws_network_acl" "acl-0a131915359d6efcd" {
  #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-0043268eaa73e9590", "subnet-0a15d2f0b76ab6617", aws_subnet.AMP-AAS-D2-XDMZ-1C.id]

  tags = {
    Business-unit = "Media Conversion"
    Environment   = "DEV"
    Name          = "AMP-AAS-D2-PUB-NACL"
    Owner         = "Nat Lovett"
    Project-code  = "AMP"
    Project-name  = "Asset_Service"
  }

  tags_all = {
    Business-unit = "Media Conversion"
    Environment   = "DEV"
    Name          = "AMP-AAS-D2-PUB-NACL"
    Owner         = "Nat Lovett"
    Project-code  = "AMP"
    Project-name  = "Asset_Service"
  }

  vpc_id = "vpc-0288bd1df33f9a19e"
}

resource "aws_network_acl" "acl-0ac841fc044fb9277" {
  #checkov:skip=CKV2_AWS_1: Ensure that all NACL are attached to subnets
  #checkov:skip=CKV_AWS_232: Ensure no NACL allow ingress from 0.0.0.0:0 to port 22
  #checkov:skip=CKV_AWS_229: Ensure no NACL allow ingress from 0.0.0.0:0 to port 21
  #checkov:skip=CKV_AWS_231: Ensure no NACL allow ingress from 0.0.0.0:0 to port 3389
  #checkov:skip=CKV_AWS_230: Ensure no NACL allow ingress from 0.0.0.0:0 to port 20
  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   = "-1"
    rule_no    = "100"
    to_port    = "0"
  }

  vpc_id = "vpc-0288bd1df33f9a19e"
}
