Terraform Plugin Protocol v6 · Beta

A Python-native
Terraform provider
framework.

Protocol handled. Logic yours.

Pyvider absorbs the gRPC transport, mTLS handshake, and Plugin Protocol v6 serialization — so you write resource logic, not wire protocol.

🐍

Pure Python

Python 3.11+ with attrs, type hints, and async/await. Use the full Python ecosystem in your providers.

🎯

Decorator-Based API

Register providers, resources, and functions with simple decorators. The hub handles discovery automatically.

📦

Protocol v6 Complete

Full Terraform Plugin Protocol v6 implementation. Compatible with Terraform and OpenTofu out of the box.

Async-First

Built on modern async/await patterns for high-performance concurrent resource operations.

🛡️

Type-Safe

Full MyPy compatibility. Schema validation catches configuration errors before Terraform does.

🧪

Testable

First-class testing support with pytest integration and a built-in test mode for unit testing providers.

Tested. For real.

Both test suites running against the pyvider provider — recorded directly from CI.

$ soup stir --recursive · conformance suite (38 tests)
$ pytest -v · component unit tests (116 tests)
Less boilerplate. Same depth.

The scaffolding and protocol are handled. What's left is your resource — schema definition and CRUD logic, in Python.

my_provider/server.py
from pyvider.providers import register_provider, BaseProvider
from pyvider.resources import register_resource, BaseResource
from pyvider.schema import s_resource, a_str
import attrs

@register_provider("mycloud")
class MyCloudProvider(BaseProvider):
    """Your cloud provider."""

@register_resource("server")
class Server(BaseResource):

    @classmethod
    def get_schema(cls):
        return s_resource({
            "name": a_str(required=True),
            "id":   a_str(computed=True),
        })

    async def _create_apply(self, ctx):
        # Create and return the new resource state
        return State(id="srv-123", name=ctx.config.name), None

    async def read(self, ctx):
        return ctx.state
Five component types.

The full surface area of Terraform Plugin Protocol v6. Decorate your classes — the hub wires them to the plugin RPC layer automatically.

@register_provider

Providers

Configuration, authentication, and initialization for your provider.

@register_resource

Resources

CRUD-managed infrastructure. Full create, read, update, delete lifecycle.

@register_data_source

Data Sources

Read-only queries. Pull existing infrastructure state into your Terraform configs.

@register_function

Functions

Custom logic callable from HCL. Transform and compute values inside Terraform configurations.

@register_ephemeral_resource

Ephemeral Resources

Short-lived write-only resources for secrets, tokens, and temporary credentials.

Ship your provider as a single binary.

Flavorpack packages pyvider providers into self-contained executables — no Python required on the end user's system.

Step 01

Write

Build your Terraform provider using pyvider. Decorate resources, implement CRUD — pure Python.

Step 02

Pack

Run flavor pack to bundle your provider, Python runtime, and all dependencies into a single .psp file.

Step 03

Deploy

Terraform executes the binary directly. No Python installation required. pyvider itself supports Linux, macOS, FreeBSD, and more.

# pyproject.toml — tell Flavorpack how to package your provider
[tool.flavor]
type          = "terraform-provider"
provider_name = "mycloud"

[tool.flavor.execution]
command = "{workenv}/bin/python"
args    = ["-m", "pyvider.plugin"]
The action packages.

Core libraries and tools that power the Pyvider ecosystem.

pyvider

The framework. Decorator-based API for building Terraform providers in Python — protocol, schema, and hub all included.

github.com/provide-io/pyvider →
pyvider-rpcplugin

Pure-Python implementation of HashiCorp's go-plugin protocol with full mTLS support and async-first design.

github.com/provide-io/pyvider-rpcplugin →
pyvider-cty

Pure-Python implementation of the go-cty type system with strong validation, serialization, and Terraform interoperability.

github.com/provide-io/pyvider-cty →
pyvider-hcl

HCL parsing integrated with Pyvider's Cty type system — parse HashiCorp Configuration Language into typed Python values.

github.com/provide-io/pyvider-hcl →
pyvider-components

Standard reusable component library for Pyvider. Reference implementations and drop-in building blocks for common provider patterns.

github.com/provide-io/pyvider-components →
terraform-provider-pyvider

The official reference Terraform provider built entirely in Python with pyvider — a working proof and learning resource.

github.com/provide-io/terraform-provider-pyvider →
flavorpack

Package pyvider providers as single-file, self-contained executables. No Python required on the end user's system.

foundry.provide.io/flavorpack →
tofusoup

Cross-language conformance test suite for OpenTofu tooling. Validates protocol compatibility across Python and Go implementations.

tofusoup →
terraform-provider-tofusoup

Terraform provider for querying OpenTofu/Terraform registries and inspecting state files — cross-stack references without remote backends.

tofusoup →
plating

Automatic documentation generation for Terraform providers. Schema extraction, capability-first organization, and registry-ready output.

plating →