terrifi

command module
v0.2.0-RC3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

README

terrifi

Yet another Terraform provider for UniFi.

Introduction

This is my attempt at making a working Terraform provider to manage my home UniFi network.

Full disclosure, much of this code is written by and with help from various AI coding agents (Claude code in particular).

Compared to existing UniFi providers (paultyng, filipowm, ubiquiti-community), Terrifi is a nearly-from-scratch implementation with a particular focus on extensive testing, including hardware-in-the-loop testing.

Docs

Background

Starting from scratch

There is some prior-art when it comes to unofficial Terraform providers for UniFi: paultyng, filipowm, ubiquiti-community. Rather than forking and fixing one of the existing providers, I decided to start from scratch. Notably, I'm still using go-unifi under the hood.

Maybe starting over is a dumb idea, but here is my reasoning:

  • I tried to import my home network into each of the existing providers and found errors and issues with each of them.
  • It seems the existing providers are either un-maintained or very sparsely maintained at this point. That's not to disparage the maintainers; we all have busy lives and other things to do. I just wanted to avoid the overhead of maintaining a fork with no real feedback on when it might get merged in.
  • I want to place a particular focus on hardware-in-the-loop testing. So I've spun up a hardware-in-the-loop test environment with a UniFi Gateway Lite, a UniFi AC Pro, and a mini PC running the UniFi OS Server control plane.
  • I just wanted to learn how to implement a Terraform provider. I've used Terraform for years, but have never had the opportunity to implement a provider.

Releasing

  1. Go to the Tag workflow in GitHub Actions.
  2. Click "Run workflow", enter the version tag (e.g., v0.1.0), and run it.
  3. The tag workflow creates and pushes the tag, which triggers the Release workflow.
  4. The release workflow builds binaries for linux/darwin (amd64/arm64) and publishes them as a GitHub Release.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
terrifi command
internal
generate
Package generate produces Terraform import blocks and resource definitions from live UniFi API data.
Package generate produces Terraform import blocks and resource definitions from live UniFi API data.
provider
Package provider implements the Terrifi Terraform provider for managing Ubiquiti UniFi network infrastructure.
Package provider implements the Terrifi Terraform provider for managing Ubiquiti UniFi network infrastructure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL