Skip to main content

Terraform provider to configure Freebox xDSL/FTTH modems

Project description

WARNING, this project is in an early stage; you should probably not use it yet.

terraform-provider-freebox is a Terraform (0.12) provider for configuring Freeboxes (the xDSL/FTTH modems provided by the French ISP Free).

This modem provides a configuration GUI for NAT configuration, port forwarding, static DHCP leases, etc. and a configuration API with the same capabilities. (The GUI uses the API).

This provider uses the same API to let you configure your Freebox using Terraform’s IaC approach.

It’s licensed under the MIT license. It’s available on the Python package index. Its documentation and its source code are on GitHub.

Questions? Remarks? Bugs? Want to contribute? Open an issue! PyPI PyPI

Quick start


Install from PyPI:

$ pip install terraform-provider-freebox


The configuration API provided by the Freebox uses a token for authentication.

You first need to obtain a token (you’ll have to do that only once). Run the following command and follow its instructions. You’ll have to click on your Freebox’ touch display.

$ terraform-provider-freebox create-token

After creating the token, it will give you a provider section to copy-paste in your Terraform configuration files. It should look like:

provider freebox {
    app_id = "terraform"
    app_token = "9m2KFLflttfuk1h52aiQvna@LWwk%02qPN4Ah3euZpT7YjP!lekb1MmfWR9qL50r"

You are responsible for keeping this token safe. If you lose it, you’ll have to create a new one.

You are responsible for keeping this token secret. Ill-intentioned people might use it to hack your network and devices.

Permissions setup

@todo Motivate why permissions have to be added manually. @todo Describe how to add permissions. @todo List what permissions must be added for each datasource and resource.

First test: get your public IP address

Add the following to your Terraform configuration:

data freebox_connection_status connection_status {}

output connection_ipv4 {
    value = data.freebox_connection_status.connection_status.ipv4

Then run terraform init and terraform plan. The later should display something like:

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.


connection_ipv4 =

Data sources


Calls GET /api/v4/connection/ and returns attributes described in ConnectionStatus.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terraform-provider-freebox-0.0.2.tar.gz (7.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page