← All notes

Why a public API isn't enough: designing IaC providers for SaaS

It is tempting to ship a documented REST API and call automation solved. That works for one-off scripts, but it does not fit how platform teams actually manage production systems.

The difference is workflow, not transport

When engineering teams ask for a Terraform or Pulumi provider, they aren't asking for another HTTP wrapper. They want product configuration—projects, alerts, routing rules, access policies, tokens—to live inside the same Git-reviewed workflow as their cloud infrastructure: reviewable plan diffs before apply, repeatable staging/prod parity, and drift detection when someone clicks around in the UI.

Model durable resources, not full API coverage

The worst way to design a provider is to mirror every REST endpoint 1:1. Start by asking which resources teams actually want to version-control, review, and recreate across environments. Leave ephemeral or purely operational actions out of state until there is a clear lifecycle reason to manage them declaratively.

Don't force complex UI artifacts into handwritten schemas

Some objects—like rich dashboards or complex query layouts—are genuinely better authored visually than in 400 lines of HCL. Modeling every nested panel and layout coordinate as typed provider fields creates a massive schema that is still painful to write by hand. Letting users export a JSON artifact and pass definition = file(...) gives them Git versioning and diffable plans without fighting the UI.

The framework is easy; the contract is the hard part

Scaffolding a Go provider with the Terraform Plugin Framework—and bridging it cleanly to Pulumi once the resource model stabilizes—is straightforward. What makes or breaks adoption is the contract underneath:

Docs and examples are half the product

A provider is not done when the binary compiles. It is done when an engineer outside your company can find the registry docs, see clearly what works in SaaS vs. self-hosted mode, and copy a working example without guessing how authentication or imports behave.

Building a Terraform/Pulumi ecosystem or control-plane API for your platform? Send me a note with what you're designing.