Skip to content

Create firewall rule for backend port if distinct from HC port #175

Open
@petomalina

Description

@petomalina

I am using this module with Istio where ingress has a health endpoint on :15021/healthz/ready while listening on :8080: for traffic.

Since the health check is targetting the first endpoint, it does not create a firewall rule for the traffic endpoint.

This is the rule I am creating manually at the moment:

data "google_compute_lb_ip_ranges" "ip_ranges" {}

resource "google_compute_firewall" "lb-http-ingress" {
  name = "global-ingress-0"

  project = var.xpn_project_id
  network = var.xpn_network_id

  source_ranges = concat(
    data.google_compute_lb_ip_ranges.ip_ranges.network,
    data.google_compute_lb_ip_ranges.ip_ranges.http_ssl_tcp_internal,
  )

  target_tags = [
    "lb-target"
  ]

  allow {
    protocol = "tcp"
    ports    = ["8080"]
  }
}

It would make sense for this module to support such a scenario natively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3medium priority issuesenhancementNew feature or requesttriagedScoped and ready for work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions