Files

3.3 KiB

page_title, subcategory, description
page_title subcategory description
netbird_reverse_proxy_service Resource - netbird Create and manage Reverse Proxy Services for the NetBird reverse proxy.

netbird_reverse_proxy_service (Resource)

Create and manage Reverse Proxy Services for the NetBird reverse proxy.

Example Usage

data "netbird_reverse_proxy_domain" "free" {
  type = "free"
}

resource "netbird_reverse_proxy_service" "example" {
  name   = "web-app"
  domain = data.netbird_reverse_proxy_domain.free.domain

  targets {
    target_id   = netbird_peer.web.id
    target_type = "peer"
    port        = 8080
    protocol    = "http"
  }

  auth {
    link_auth {
      enabled = true
    }
  }
}

Schema

Required

  • auth (Attributes) Authentication configuration (see below for nested schema)
  • domain (String) Domain for the service
  • name (String) Service name
  • targets (Attributes List) List of target backends for this service (see below for nested schema)

Optional

  • enabled (Boolean) Whether the service is enabled
  • pass_host_header (Boolean) When true, the original client Host header is passed through to the backend
  • rewrite_redirects (Boolean) When true, Location headers in backend responses are rewritten to replace the backend address with the public-facing domain

Read-Only

  • id (String) Service ID
  • proxy_cluster (String) The proxy cluster handling this service (derived from domain)

Nested Schema for auth

Optional:

Nested Schema for auth.bearer_auth

Required:

  • enabled (Boolean)

Optional:

  • distribution_groups (List of String) List of group IDs that can use bearer auth

Required:

  • enabled (Boolean)

Nested Schema for auth.password_auth

Required:

  • enabled (Boolean)

Optional:

  • password (String, Sensitive)

Nested Schema for auth.pin_auth

Required:

  • enabled (Boolean)

Optional:

  • pin (String, Sensitive)

Nested Schema for targets

Required:

  • port (Number) Backend port for this target (0 for scheme default)
  • protocol (String) Protocol to use when connecting to the backend (http, https)
  • target_id (String) Target ID (resource or peer ID)
  • target_type (String) Target type (peer, host, domain, subnet)

Optional:

  • enabled (Boolean) Whether this target is enabled
  • host (String) Backend IP or domain for this target. If omitted, the API resolves it from the target peer.
  • path (String) URL path prefix for this target. Defaults to "/" if omitted.