opnsense_settings_gateway (Resource)

Manage individual gateways under System → Gateways → Single.

Example Usage

resource "opnsense_settings_gateway" "test" {
  name            = "TEST_123"
  interface       = "wan"
  ip_protocol     = "inet"
  description     = "Terraform managed gateway"
  priority        = 0
  weight          = 1
  monitor_disable = false
  disabled        = false
}

Schema

Required

  • interface (String) Interface identifier (e.g., wan, lan) the gateway belongs to.
  • ip_protocol (String) IP protocol of the gateway, usually inet for IPv4 or inet6 for IPv6.
  • name (String) Unique name for the gateway, e.g. WAN_DHCP.

Optional

  • data_length (Number) ICMP payload size in bytes for monitoring pings.
  • default_gateway (Boolean) Set this gateway as default for the selected protocol. Defaults to false.
  • description (String) Optional free-form description for your reference.
  • disabled (Boolean) Disable this gateway. Defaults to false.
  • far_gateway (Boolean) Allow the gateway to exist outside the interface subnet. Defaults to false.
  • force_down (Boolean) Manually force the gateway status to down. Defaults to false.
  • gateway (String) Gateway IP address. Leave empty for dynamic gateways that derive their address from the interface.
  • interval (Number) Ping interval in seconds for monitoring.
  • latency_high (Number) High latency threshold in milliseconds.
  • latency_low (Number) Low latency threshold in milliseconds.
  • loss_high (Number) High packet loss threshold as percentage.
  • loss_interval (Number) Monitoring loss interval in milliseconds.
  • loss_low (Number) Low packet loss threshold as percentage.
  • monitor (String) Optional monitor IP address or host.
  • monitor_disable (Boolean) Disable gateway monitoring. Defaults to false.
  • monitor_kill_states (Boolean) Kill states when the gateway transitions to down. Defaults to false.
  • monitor_kill_states_priority (Number) Optional priority to control state killing order across gateways.
  • monitor_no_route (Boolean) Do not create monitoring routes automatically. Defaults to false.
  • priority (Number) Gateway priority (lower is preferred).
  • time_period (Number) Monitoring time period in seconds.
  • weight (Number) Load balancing weight for the gateway.

Read-Only

  • id (String) UUID of the gateway.