Skip to content

frostmoln_lb_health_monitor (Resource)

Manages the health monitor of a Frostmoln load balancer pool. A pool has at most one health monitor (singleton).

Example Usage

terraform
# A health monitor for a load balancer pool. A pool has at most one health
# monitor (singleton); the type must be tcp, http, or https (ping is not
# supported).
resource "frostmoln_lb_health_monitor" "backend" {
  load_balancer_id = frostmoln_load_balancer.web.id
  pool_id          = frostmoln_lb_pool.backend.id
  type             = "http"
  delay            = 5
  timeout          = 3
  max_retries      = 3
  url_path         = "/healthz"
  http_method      = "GET"
  expected_codes   = "200"

  # The monitor's OWN tags — separate from its pool's and the load balancer's.
  # Removing this block removes every tag from the monitor.
  tags = {
    env = "prod"
  }
}

Schema

Required

  • load_balancer_id (String) The ID of the load balancer the pool belongs to. Changing this forces a new resource.
  • pool_id (String) The ID of the pool this health monitor belongs to. Changing this forces a new resource.
  • type (String) The health check type: tcp, http, or https. Changing this forces a new resource.

Optional

  • delay (Number) The interval in seconds between health checks.
  • expected_codes (String) The HTTP status codes considered healthy (http/https monitors), e.g. "200" or "200-299".
  • http_method (String) The HTTP method used for the health check (http/https monitors).
  • max_retries (Number) The number of successful checks before a member is marked healthy.
  • tags (Map of String) Key-value tags for the health monitor. These are the monitor's own tags, separate from its pool's and the load balancer's.
  • timeout (Number) The time in seconds to wait for a health check response.
  • url_path (String) The HTTP path to probe (http/https monitors).

Read-Only

  • created_at (String) The creation timestamp.
  • id (String) The unique identifier of the health monitor.
  • updated_at (String) The last update timestamp.