TofuSoup
Cross-language conformance testing and developer tools for the Terraform/OpenTofu ecosystem. Verify that your Python, Rust, or Go implementation matches the protocol — down to the wire.
TofuSoup CLI
A developer toolkit and conformance test runner. Inspect CTY values, encode/decode wire format, validate cross-language RPC behaviour, and run compatibility matrices across Terraform and OpenTofu versions.
soup test all
terraform-provider-tofusoup
A production Terraform provider with 9 data sources for querying provider/module registries and inspecting state files. Cross-stack references without remote state backends.
data "tofusoup_state_outputs" "app" {}
Protocol drift
CTY serialization, HCL parsing, and Plugin Protocol v6 wire format have subtle edge cases. A Python implementation that passes functional tests can still produce subtly different bytes than the Go reference — breaking Terraform silently.
Version fragmentation
Your provider works on Terraform 1.5. Does it work on OpenTofu 1.8? 1.9? Testing across the version matrix by hand doesn't scale.
No canonical reference
There's no standard tooling for inspecting CTY values, decoding wire-format payloads, or validating protocol behaviour during development. You're flying blind.
Each subcommand targets a specific layer of the Terraform protocol. Use them standalone during development or wire them into CI.
soup cty viewInspect CTY structures as rich tree viewssoup cty convertConvert between JSON, MessagePack, and HCLsoup cty validate-valueValidate a value against a CTY type stringsoup cty benchmarkBenchmark encoding/decoding performancesoup hcl viewParse HCL and display the CTY structuresoup hcl convertConvert HCL to JSON or MessagePacksoup wire encodeEncode to Terraform's wire format (MessagePack + Base64)soup wire decodeDecode wire format back to JSON for inspectionsoup rpc kv server-startStart a Python or Go RPC serversoup rpc kv get/putClient operations for cross-language RPC testingsoup test allRun the full conformance suitesoup test cty|hcl|wire|rpcRun a targeted subsetA single command runs your provider or tool against a matrix of Terraform and OpenTofu versions in parallel. Catch version-specific regressions before users do.
soup stir
# Parallel execution — results per version
✓ terraform-1.5 — 48/48 passed
✓ terraform-1.6 — 48/48 passed
✓ opentofu-1.8 — 48/48 passed
✓ opentofu-1.9 — 48/48 passed
Functional tests pass. That's not enough. TofuSoup validates that your implementation produces byte-for-byte identical output to the Go reference across CTY serialization, HCL parsing, and wire protocol encoding.
Binary Equivalence
Python vs. Go output compared at the byte level. Catches encoding differences that functional tests miss.
Cross-Language RPC
Start a Go server, connect a Python client — or vice versa. Validate that mTLS, handshake, and message framing work across implementations.
Reference Harnesses
Go reference implementations built into the test suite. soup harness build compiles them; the conformance tests use them as ground truth.
pyvider Integration
First-class testing for pyvider-based providers. The suite validates the full pyvider stack against Terraform's canonical Go behaviour.
Parallel Execution
pytest-based with async support throughout. Matrix runs execute concurrently — full suite in seconds, not minutes.
CI-Ready
Structured output, exit codes, and soup.toml config. Drop into any pipeline without wrapper scripts.
Nine data sources across two groups. No remote state backends required for cross-stack references.
tofusoup_provider_infoProvider details, description, and ownershiptofusoup_provider_versionsAll versions with platform availabilitytofusoup_module_infoModule metadata and source detailstofusoup_module_versionsModule version history and compatibilitytofusoup_module_searchSearch modules by query stringtofusoup_registry_searchUnified search across providers and modulestofusoup_state_infoState file metadata and aggregate statisticstofusoup_state_resourcesList and filter resources in a state filetofusoup_state_outputsExtract output values from any state filepath = "../networking/terraform.tfstate"
}
resource "aws_instance" "app" {
subnet_id = data.tofusoup_state_outputs.networking.values["subnet_id"]
}
data "tofusoup_provider_versions" "aws" {
provider = "hashicorp/aws"
}
The framework TofuSoup tests. Build Terraform providers in Python — TofuSoup validates they're protocol-correct.
Package TofuSoup-validated providers as single executables. The full pipeline: build → test → ship.
Source, issues, and the CHANGELOG. Pre-release — breaking changes possible until 1.0.
TofuSoup is pre-release. The conformance suite and CLI tools are usable today.