freebox_port_forwarding (Resource)

Manages a port forwarding between a local network host and the Freebox Internet Gateway

Example

resource "freebox_port_forwarding" "example" {
  enabled          = true
  ip_protocol      = "udp"
  target_ip        = "192.168.1.255"
  comment          = "This is an example comment"
  source_ip        = "0.0.0.0"
  # Required to set either source_port/target_port as shown
  # to do port mapping, or range_port_start/range_port_end
  # to forward a full range of ports without port forwarding
  source_port      = 443
  target_port      = 8443
}

output "hostname" {
  value = resource.freebox_port_forwarding.example.hostname
}

Schema

Required

  • enabled (Boolean) Status of the forwarding
  • ip_protocol (String) Protocol to handle
  • target_ip (String) Local IP of the local port forwarding target

Optional

  • comment (String) Additional comment associated with the rule
  • port_range_end (Number) End boundary of the port range to forward. Conflicts with source_port and target_port
  • port_range_start (Number) Start boundary of the port range to forward. Conflicts with source_port and target_port
  • source_ip (String) Local IP of the local port forwarding target. If left unset or set to 0.0.0.0, the rule will apply to any incoming IP
  • source_port (Number) Single source port to forward. Conflicts with port_range_start and port_range_end
  • target_port (Number) Single target port to forward to. Conflicts with port_range_start and port_range_end

Read-Only

  • hostname (String) Name of the target host in the local network
  • id (Number) Unique identifier of the port forwarding

Import

# ------------------------------------------------ 👇 is the ID of the virtual machine
terraform import "freebox_port_forwarding.example" 78