GCP - VM is not getting healthy in backend service

I am creating a jenkins instance and then adding it to instance group and configuring the backend service. When I go to the console the the instance is in unhealthy state. Any help would be appreciated

resource "google_compute_instance_group" "group" {
  name      = "jenkins-instance-group"
  zone      = "us-central1-a"
  instances = [var.instances.id]
  named_port {
    name = "http"
    port = "8080"
  }
  
  named_port {
    name = "http"
    port = "80"
  }

  named_port {
    name = "https"
    port = "8443"
  }

  lifecycle {
    create_before_destroy = true
  }
}
resource "google_compute_backend_service" "staging_service" {
  name      = "staging-service"
  port_name = "https"
  protocol  = "HTTPS"

  backend {
    group = var.group.id
  }

  health_checks = [
    google_compute_https_health_check.staging_health.id,
  ]
}

resource "google_compute_https_health_check" "staging_health" {
  name         = "staging-health"
  request_path = "/"
}