1. Packages
  2. Packages
  3. Freebox
Viewing docs for Freebox v0.3.11
published on Friday, Jul 3, 2026 by OlivierPaquien
freebox logo
Viewing docs for Freebox v0.3.11
published on Friday, Jul 3, 2026 by OlivierPaquien

    The Freebox provider lets you manage a Freebox router through the Freebox API as infrastructure as code. It is a native Pulumi provider implemented in Go with pulumi-go-provider, ported from terraform-provider-freebox without the Terraform Bridge.

    Resources

    TokenDescription
    freebox:fw:PortForwardingPort forwarding rule (NAT)
    freebox:virtual:DiskVirtual disk (qcow2/raw) on the Freebox
    freebox:virtual:MachineVirtual machine configuration and optional power state
    freebox:virtual:MachinePowerVM power state only (running / stopped), independent of VM config
    freebox:dhcp:StaticLeaseDHCP static lease (reserve an IPv4 address for a MAC address)
    freebox:downloads:FileFile on the Freebox (download, copy, upload, extract)
    freebox:vpn:ServerOpenVPN server configuration (singleton per Freebox)
    freebox:vpn:UserOpenVPN user account
    freebox:lan:ConfigLAN configuration (singleton per Freebox)

    Virtual machines: Machine vs MachinePower

    • Use freebox:virtual:Machine when you manage VM configuration (disk, memory, vCPUs) and optionally power state via the status property (running or stopped, default running).
    • Use freebox:virtual:MachinePower when you want to control power independently from configuration (for example start/stop on a schedule without changing VM settings).
    • Do not manage the same VM with both status on Machine and a MachinePower resource — pick one approach per VM.

    Functions

    TokenDescription
    freebox:api:VersionFreebox API discovery (version, model, etc.)
    freebox:virtual:getVirtualDiskVirtual disk information (type, sizes)
    freebox:dhcp:getLeaseDHCP static lease by MAC address
    freebox:dhcp:getLeasesList all DHCP static leases
    freebox:lan:getConfigRead LAN configuration
    freebox:lan:getInterfacesList LAN interfaces
    freebox:lan:getInterfaceHostsList hosts on a LAN interface
    freebox:lan:getInterfaceHostRead a single LAN host
    freebox:virtual:getDistributionsVM OS distributions available on the Freebox
    freebox:system:getInfoFreebox system information

    Example

    The example below creates a TCP port forwarding rule that exposes SSH on the WAN side and forwards traffic to a host on the LAN.

    import * as pulumi from "@pulumi/pulumi";
    import * as freebox from "pulumi-freebox";
    
    const pf = new freebox.PortForwarding("ssh", {
        enabled: true,
        ipProtocol: "tcp",
        portRangeStart: 22,
        targetIp: "192.168.1.10",
        comment: "SSH",
    });
    
    import pulumi
    import pulumi_freebox as freebox
    
    pf = freebox.PortForwarding(
        "ssh",
        enabled=True,
        ip_protocol="tcp",
        port_range_start=22,
        target_ip="192.168.1.10",
        comment="SSH",
    )
    
    using Pulumi;
    using OlivierPaquien.Pulumi.Freebox;
    
    var pf = new PortForwarding("ssh", new PortForwardingArgs
    {
        Enabled = true,
        IpProtocol = "tcp",
        PortRangeStart = 22,
        TargetIp = "192.168.1.10",
        Comment = "SSH",
    });
    
    package main
    
    import (
    	"github.com/OlivierPaquien/pulumi-freebox/sdk/go/freebox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := freebox.NewPortForwarding(ctx, "ssh", &freebox.PortForwardingArgs{
    			Enabled:        pulumi.Bool(true),
    			IpProtocol:     pulumi.String("tcp"),
    			PortRangeStart: pulumi.Int(22),
    			TargetIp:       pulumi.String("192.168.1.10"),
    			Comment:        pulumi.String("SSH"),
    		})
    		return err
    	})
    }
    
    name: freebox-example
    runtime: yaml
    config:
      freebox:endpoint: http://mafreebox.freebox.fr
      freebox:appId: "your_app_id"
      freebox:token:
        secret: your_token
    
    resources:
      ssh:
        type: freebox:fw:PortForwarding
        properties:
          enabled: true
          ipProtocol: tcp
          portRangeStart: 22
          targetIp: "192.168.1.10"
          comment: SSH
    

    Source

    freebox logo
    Viewing docs for Freebox v0.3.11
    published on Friday, Jul 3, 2026 by OlivierPaquien

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial