resource "kubernetes_network_policy" "default_deny" {
  metadata {
    name = "default-deny"
  }
  spec {
    pod_selector {
      match_labels = {
        IngressInternal = "active"
      }
    }
    ingress {
      ports {
        protocol = "TCP"
        port     = "80"
      }
      ports {
        protocol = "TCP"
        port     = "443"
      }
      from {
        ip_block {
          cidr = "10.0.0.0/8"
        }
      }
      from {
        ip_block {
          cidr = "172.16.0.0/12"
        }
      }
      from {
        ip_block {
          cidr = "192.168.0.0/16"
        }
      }
    }
    policy_types = ["Ingress", "Egress"]
  }
}
