'Enable kubernetes nginx ingress compression in terraform configuration

using helm bitnami chart nginx-ingress-controller and also this terraform code to create the controller, how to enable the gzip request compression? it seems to be configmap option use-gzip="true" but how to enable it here?

resource "kubernetes_ingress" "nginx" {

  metadata {
    name      = "${data.terraform_remote_state.main.outputs.app_name}-ingress"
    namespace = "default"
    annotations = {
      "kubernetes.io/ingress.class"                             = "nginx"
      "nginx.ingress.kubernetes.io/ssl-redirect"                = "true"
      "nginx.ingress.kubernetes.io/proxy-buffer-size"           = "128k"

    }
  }
  spec {
    tls {
      secret_name = data.terraform_remote_state.main.outputs.tls_secret_name
    }
    #ui
    rule {
      host = "myhost.com"
      http {
        path {
          path = "/"
          backend {
            service_name = "mybackend"
            service_port = "80"
          }
        }
      }
    }
  }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source