README
¶
terraform-provider-taipan - Governance as Code
Manage TokenFuse Cloud spend budgets and Agent Passports the same way you already manage the rest of your infrastructure: in version control, PR-reviewed, applied by the same Terraform pipeline your platform team runs everything else through.
terraform-provider-taipan closes a governance gap: a FinOps or platform team that
runs a bank's cloud infrastructure through Terraform today has to manage AI-agent
budgets and agent identities out of band (a dashboard click here, a curl command
there), with no PR review, no diff, and no audit trail beyond whatever the target
system logs on its own. This provider turns TokenFuse Cloud spend budgets and Agent
Passport documents into plain Terraform resources: reviewed in a PR like an IAM
policy or a security group, planned before they apply, diffed when they drift, and
auditable through the same terraform plan/apply history as the rest of the
estate. This is purely defensive tooling: the provider only configures controls
the operator already owns (their own TokenFuse Cloud org, their own passport
documents); it never reaches into, scans, or takes any action against a third-party
system.
Where this fits in the stack
terraform-provider-taipan is the governance-as-code plane of the TAIPANBOX agent-governance stack: it renders TokenFuse Cloud budgets and Agent Passports as reviewable, PR-gated Terraform resources.
flowchart TB
Agent["AI agent (any framework)"] -->|"LLM call (base-URL swap)"| TF["TokenFuse proxy: spend + enforcement"]
TF -->|"POST /v1/decide (PEP)"| WX["Wardryx: policy PDP"]
WX -.->|"allow / deny / hold"| TF
TF -->|"cheapest model, budget OK"| LLM[("LLM provider")]
TF -->|"CallRecords"| CL["TokenFuse Cloud: control plane, incidents, replay, evidence, kill-switch"]
VCX["Vouchryx: delegation proved, and endable"] -->|"short-lived token: act + cnf"| TF
TF -.->|"polls /v1/revocations"| VCX
VCX ==>|"delegation_issued / denied / revoked"| BUS
TF ==>|"agent-event NDJSON"| BUS{{"agent-event bus + Agent Passport"}}
WX ==> BUS
Agent -->|"web fetch"| SCX["Scopyx: governed web egress"]
SCX -->|"POST /v1/decide"| WX
SCX ==>|"web_fetch / web_blocked"| BUS
ENG["Engram: memory"] -->|"reflect via base_url"| TF
ENG ==> BUS
BUS ==> IDX["Idryx: identity graph, detectors, Agent-BOM"]
IDX ==>|"identity_finding"| BUS
BUS ==> QX["Qryx: crypto / PQC, passport + hash-chain scan"]
QX ==>|"crypto events"| BUS
BUS ==> VX["Verdryx: quality / drift"]
VX ==>|"quality events"| BUS
TF -->|"outcome-tagged traces"| VX
MX["Mockryx: pre-prod safety rehearsal"] -->|"hostile scenarios"| TF
MX ==>|"sim events"| BUS
BILL[("cloud, SaaS and model bills")] --> CC["CostCrew: the bill, worked by a crew of agents"]
CC ==>|"spend_spike / budget_threshold / crew moves"| BUS
BUS ==> TRX["Trailryx: the record plane, sealed and packed"]
BUS ==> HX["reads the log, mails you (heraldyx)"]
HX -->|"one mail, a view and never an action"| OPS["your mailbox"]
HX ==>|"alert_sent"| HJ[("heraldyx's own hash-chained journal, not this bus")]
YOU(["you, in a browser over your own tunnel"]) --> GX[["Genaryx: the console over all of it"]]
GX -->|"signed commands: the kill, an approval, a policy"| CL
GX -->|"signed commands"| WX
GX ==>|"console_command"| BUS
GX -.->|"reads it"| IDX
GX -.->|"reads it"| QX
GX -.->|"reads it"| VX
GX -.->|"reads it"| MX
GX -.->|"reads it"| ENG
GX -.->|"reads it"| SCX
GX -.->|"reads it"| CC
TFP["terraform-provider-taipan"] -->|"budgets + passports as code"| CL
ASG[["agent-stack-go: shared Go contract"]] -.->|imported by| IDX
ASG -.->|imported by| WX
ASG -.->|imported by| MX
ASG -.->|imported by| TFP
ASG -.->|imported by| HX
ASG -.->|imported by| QX
SPEC[["agent-passport: the spec"]] -.->|governs| BUS
- Consumes: Terraform configuration (
taipan_budget,taipan_agent_passport,taipan_wardryx_policyresources). - Produces: TokenFuse Cloud spend budgets, rendered/validated Agent Passport documents, and Wardryx policy-as-code documents.
- Talks to: TokenFuse Cloud (the
taipan_budgetAPI), agent-passport (validates againstagent-stack-go/passport'sParse, the same check Idryx runs on ingest), Wardryx (thetaipan_wardryx_policyadmin/v1/policiesAPI); imports agent-stack-go.
The full stack is TokenFuse (spend), Wardryx (policy), Vouchryx (delegation), Engram (memory), Idryx (access), Qryx (crypto), Verdryx (quality), Mockryx (pre-prod), scopyx (governed web egress), CostCrew (the bill), Trailryx (the record) and heraldyx (the mail out), on the shared Agent Passport + agent-event contract (agent-stack-go / agent-passport), configured via terraform-provider-taipan and driven from Genaryx, the console over all of it.
Run the whole open stack locally with one command via stack-up; the stack's home on the web is it-rat.com.
Resources
The diagram above predates taipan_unit_budget, the fourth resource in the table below; it still
shows the original three.
Four parts of the TAIPANBOX stack are plain Terraform resources today, all reviewed in a PR, planned before they apply, and diffed when they drift:
| Resource | Status | Calls an API? | Purpose |
|---|---|---|---|
taipan_budget |
shipped | yes (TokenFuse Cloud) | Central spend budget for one run |
taipan_unit_budget |
shipped | yes (TokenFuse Cloud) | Central monthly spend budget for one business unit, across every run attributed to it |
taipan_agent_passport |
shipped | no (renders a file) | Agent Passport document (taipanbox.dev/agent-passport/v0.1) |
taipan_wardryx_policy |
shipped | yes (Wardryx) | One Wardryx policy-as-code document, layered on top of Wardryx's own file-loaded policies |
The provider currently exposes no data sources (Provider.DataSources() returns an
empty list): read-back today goes through terraform state/refresh, not a
data "taipan_..." block.
taipan_budget
resource "taipan_budget" "support_bot" {
run_id = "support-bot-2026-07-09"
limit_usd = 25.00
}
run_id(string, required, forces replacement): the run this budget applies to. Budgets are keyed by run id in TokenFuse Cloud, so there is no in-place rename.limit_usd(number, required): the budget in US dollars. Sent to the Cloud API asbudget_usd; the server stores and reports it in microdollars (budget_usd * 1_000_000), and this provider converts back to dollars for state.
Create and Update both call POST /v1/runs/{run_id}/budget, the only endpoint the
Cloud API exposes for this: there is no separate PATCH. Read calls GET /v1/budgets
and looks up this run id in the response; if the run no longer has a central budget,
the resource is dropped from state so Terraform plans a recreate instead of reporting
a false "no changes".
Delete is best-effort and state-only. TokenFuse Cloud has no budget-delete
endpoint: crates/cloud/src/http.rs routes POST /v1/runs/{run}/budget
(set/overwrite) and GET /v1/budgets (read), and nothing else for budgets. Destroying
a taipan_budget resource removes it from Terraform state; the budget itself stays
set in TokenFuse Cloud until something else overwrites it. This is a deliberate
choice, not an oversight: inventing a DELETE call here would 404 against every real
deployment.
terraform import taipan_budget.<name> <run_id> brings an existing run budget under
management.
taipan_unit_budget
resource "taipan_unit_budget" "treasury" {
unit_id = "treasury"
limit_usd = 2000.00
}
unit_id(string, required, forces replacement): the business unit this budget applies to, e.g.treasury. Business units are how the identity map attributes spend when a key or anagent://prefix binds to one (see TokenFuse'sdocs/20-identity-map.md, section 4); there is no in-place rename.limit_usd(number, required): the monthly budget in US dollars. Sent to the Cloud API asbudget_usd; the server stores and reports it in microdollars (budget_usd * 1_000_000), and this provider converts back to dollars for state.
A distinct governance control from taipan_budget, not a variant of it: taipan_budget
caps one run by run_id; taipan_unit_budget caps every run attributed to one
business unit, enforced over a UTC calendar month. The wire shape is structurally
identical to taipan_budget (same request/response fields, same admin-only write), which
is why this resource follows the exact same pattern.
Create and Update both call POST /v1/units/{id}/budget, the only endpoint the Cloud API
exposes for this. Read calls GET /v1/unit-budgets, a deliberately separate endpoint from
GET /v1/budgets (the run-budget payload is a flat run_id -> microdollars map old
gateways parse verbatim, so TokenFuse Cloud never grows a nested key into it); if the unit
no longer has a central budget override, the resource is dropped from state so Terraform
plans a recreate instead of reporting a false "no changes".
Delete is best-effort and state-only, mirroring taipan_budget: TokenFuse Cloud has no
unit-budget-delete endpoint either, only POST /v1/units/{id}/budget (set/overwrite) and
GET /v1/unit-budgets (read). Destroying a taipan_unit_budget resource removes it from
Terraform state; the unit's budget stays set in TokenFuse Cloud until something else
overwrites it.
terraform import taipan_unit_budget.<name> <unit_id> brings an existing unit budget under
management.
taipan_agent_passport
resource "taipan_agent_passport" "support_bot" {
id = "agent://acme-bank.example/support/tier1-bot"
owner = "team-support@acme-bank.example"
display_name = "Tier-1 support bot"
runtime = "langgraph"
attestation_method = "spiffe-svid"
attestation_detail = "spiffe://acme-bank.example/support/tier1-bot"
labels = {
env = "prod"
cost_center = "cs-eu"
}
# Optional: folders this agent is declared to access (SPEC.md §4.4) and the
# LLM providers/models/endpoints it uses (SPEC.md §4.5). Both are
# declarations carried on the passport for audit and inventory, not controls
# this stack enforces at runtime.
filesystem {
path = "/data/reports"
mode = "read"
}
filesystem {
path = "/data/out"
mode = "write"
}
models {
provider = "anthropic"
model = "claude-sonnet-4-5"
endpoint = "api.anthropic.com"
}
output_path = "${path.module}/passports/tier1-bot.json"
}
This resource calls no API. A passport is a small, static JSON document, not a
server-managed object; Idryx and Qryx read it from disk. Create and Update render and
validate the document, reusing agent-stack-go/passport's Parse verbatim (the exact
validation Idryx runs on ingest), so a taipan_agent_passport that applies cleanly is
guaranteed to parse cleanly through Idryx too. If output_path is set, the rendered
document is written there at file mode 0600; Delete removes that file, if any.
The rendered document is also available as the computed json attribute, for piping
into another resource. Rendering is deterministic: struct fields marshal in a fixed
declared order and labels (a Go map) is serialized with sorted keys, both guaranteed
by encoding/json, so the same input always produces byte-identical output.
Fields: id (the agent:// URI, required, forces replacement, validated with
ValidateAgentURI), owner (required), display_name / runtime / parent /
attestation_method / attestation_detail (all optional), labels (optional
map(string)), output_path (optional). attestation_detail is an unconstrained
string (agent-passport/SPEC.md §4.3: e.g. a SPIFFE ID for spiffe-svid, an issuer
URL for oidc); it is only rendered when attestation_method is also set, and
omitted from the document entirely otherwise.
Two optional repeatable blocks carry the newer Agent Passport arrays, rendered
as the document's root-level filesystem and models (agent-passport/SPEC.md
§4.4-4.5), and matching the filesystem {} / models {} blocks the Genaryx
onboard wizard generates: filesystem { path mode } (both required; mode is
read or write) declares a folder the agent accesses, and
models { provider model endpoint } (only provider required) declares an LLM
provider/model/endpoint it uses. Both are declarations carried on the passport
for audit and inventory, not controls this stack enforces at runtime; each is
omitted from the rendered document when no blocks are set, so a passport
declaring neither renders byte-for-byte as before these blocks existed.
Import takes a file path, not the passport's own id. This resource calls no
API, so unlike taipan_budget/taipan_wardryx_policy (whose Read fetches the rest
of the resource from a live server given just an id), there is nothing to fetch
taipan_agent_passport's other attributes from: they have to come from the document
itself. terraform import taipan_agent_passport.<name> ./passports/tier1-bot.json
reads and parses that exact file (the same agent-stack-go/passport.Parse Create and
Update already round-trip through) and populates every attribute from it, including
output_path, set to the path just given -- so an existing passport JSON on disk,
exactly what catalog/passport-templates or the Genaryx onboard wizard produce, can
be brought under management without a recreate.
taipan_wardryx_policy
resource "taipan_wardryx_policy" "ops_guard" {
id = "ops-guard"
target = "agent://acme-bank.example/ops/*"
deny_tool = ["shell_exec"]
allow_domains = ["good.example.com"]
require_human_above_usd = 500
deny_above_usd = 5000
max_steps = 40
deny_if_unattested = true
}
Manages one Wardryx admin policy-as-code document via PUT/GET/DELETE /v1/policies/{id}, on top of the operator's own Wardryx deployment. This is
layered, not exclusive: Wardryx's own -policy/WARDRYX_POLICY file-loaded
rules stay a permanent floor no taipan_wardryx_policy write can remove, and
those file-loaded rules aren't manageable through this resource at all (they
carry no id) -- see Wardryx's own README, "Policy-as-code". Create and
Update both call PUT /v1/policies/{id}, Wardryx's own upsert endpoint;
Read calls GET /v1/policies/{id} and drops the resource from state if the
policy is gone (deleted out of band), so Terraform plans a recreate instead
of a false "no changes". Unlike taipan_budget, this Delete is real:
Wardryx's policy API has an actual DELETE /v1/policies/{id}, so destroying
this resource removes the rule from Wardryx, not just from Terraform state.
Fields: id (the policy id, e.g. ops-guard, required, forces replacement --
Wardryx addresses policies by id, not name, and there is no rename) and
target (the agent:// glob, required) are the only required attributes.
name / deny_tool / allow_domains / require_human_above_usd /
deny_above_usd / max_steps / deny_if_unattested are all optional,
mirroring policy.Policy's fields in the wardryx repo one-for-one; each has
a matching zero-value default ("" / [] / 0 / false), since Wardryx's
own wire format can't distinguish an explicitly-set zero value from an
omitted one (omitempty) and a mismatched default would otherwise make
every plan for an unconfigured field fail with "provider produced
inconsistent result". updated_at is computed: the RFC 3339 timestamp of
this policy's last write, as reported by Wardryx.
terraform import taipan_wardryx_policy.<name> <policy_id> brings an existing
Wardryx policy under management.
Provider configuration
provider "taipan" {
cloud_url = "https://cloud.tokenfuse.example" # or TOKENFUSE_CLOUD_URL
cloud_key = var.tokenfuse_cloud_key # or TOKENFUSE_CLOUD_KEY
wardryx_url = "https://wardryx.acme.example" # or WARDRYX_URL
wardryx_key = var.wardryx_admin_key # or WARDRYX_KEY
}
| Attribute | Env fallback | Notes |
|---|---|---|
cloud_url |
TOKENFUSE_CLOUD_URL |
Base URL of the TokenFuse Cloud control plane. Needed by taipan_budget. |
cloud_key |
TOKENFUSE_CLOUD_KEY |
Sensitive. Sent as Authorization: Bearer <cloud_key>. taipan_budget mutations need an admin-role key; the bearer format is key:org[:role]. |
wardryx_url |
WARDRYX_URL |
Base URL of the operator's Wardryx deployment. Needed by taipan_wardryx_policy. |
wardryx_key |
WARDRYX_KEY |
Sensitive. Sent as Authorization: Bearer <wardryx_key> -- just the key segment of one WARDRYX_KEYS entry (key:org:role), not the full triple. taipan_wardryx_policy requires the key's role to be admin. |
All four are optional at the provider level and validated lazily, per resource type:
a passport-only configuration needs none of them, a budget-only configuration only
needs cloud_url/cloud_key, and so on. Each resource's own Configure reports a
single clear diagnostic ("Missing TokenFuse Cloud configuration" / "Missing Wardryx
configuration") the first time it is actually touched with its pair unset, rather than
the provider failing unconditionally for every resource regardless of which one a
given configuration actually uses.
Governance as code, the loop
The loop is the same one a platform team already runs for every other resource type:
author the HCL, terraform plan shows the diff against live state (TokenFuse Cloud
budgets, passport files on disk), terraform apply reconciles reality to match the
declared configuration, and if anything changes out of band afterward (a dashboard
click, a direct API call), the next terraform plan reads live state again, shows
the delta, and apply reconciles it back. No side channel survives the next
plan/apply: budgets and passports stop being a place configuration can silently
drift.
Install
terraform-provider-taipan is published on the Terraform Registry as
TAIPANBOX/taipan,
GPG-signed, at 0.1.0 since 23 July 2026. See "Publishing a release" below for
how a release is actually cut, which is not yet the tag-triggered path. Add it
to a required_providers block and run terraform init, same as any other
provider:
terraform {
required_providers {
taipan = {
source = "TAIPANBOX/taipan"
version = "~> 0.1"
}
}
}
Provider development
Working on the provider itself, or need an unreleased change before the next tag? Build from source and point Terraform at that local build with a dev override instead of the Registry.
git clone https://github.com/TAIPANBOX/terraform-provider-taipan
cd terraform-provider-taipan
go build -o terraform-provider-taipan .
Then add a dev override to ~/.terraformrc:
provider_installation {
dev_overrides {
"TAIPANBOX/taipan" = "/path/to/terraform-provider-taipan"
}
direct {}
}
Point the path at the directory containing the binary you just built. With
dev_overrides active, terraform init is skipped for this provider, and
terraform plan/apply use the local build directly.
Verify a download
Every release is signed keyless with Sigstore and carries a build-provenance
attestation and an SBOM, beside the GPG signature the Terraform Registry
itself reads. With cosign and gh installed:
version=<version> # e.g. 0.1.1, no leading v
base="terraform-provider-taipan_${version}"
cosign verify-blob --bundle "${base}_SHA256SUMS.sigstore.json" \
--certificate-identity "https://github.com/TAIPANBOX/terraform-provider-taipan/.github/workflows/release.yml@refs/tags/v${version}" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com "${base}_SHA256SUMS"
sha256sum -c "${base}_SHA256SUMS"
gh attestation verify "${base}_linux_amd64.zip" -R TAIPANBOX/terraform-provider-taipan
${base}_SHA256SUMS.sig, beside the checksums file, is the GPG signature the
Registry itself verifies against the public key registered under the
TAIPANBOX namespace; the commands above are an independent check anyone can
run without that key. The SBOM (SPDX) describes the dependency graph the
build was made from, and the provenance bundle is attached as a release asset
too, both beside the checksums and archives.
Releases v0.1.0 and v0.1.1 predate this; whether a later tag carries it is visible from that release's own assets.
Example
See examples/main.tf for a complete provider block plus one of
each resource.
Development
make build # go build -> bin/terraform-provider-taipan
make test # go test -race ./...
make testacc # TF_ACC acceptance tests against real, disposable local backends
make lint # go vet + staticcheck + gofmt -l
make govulncheck
make gosec
CI (.github/workflows/ci.yml) runs gofmt, go vet, staticcheck, go test -race,
go build in a build job, govulncheck + gosec -quiet in a security job, and the
TF_ACC acceptance tests below in a third acceptance job, mirroring the rest of the
TAIPANBOX Go stack (see Idryx) for the first two.
go test -race ./... (what make test and the build job both run) needs neither a
real Terraform binary nor a live TokenFuse Cloud/Wardryx: the taipan_agent_passport
render/validate logic is unit-tested directly, and taipan_budget's, taipan_unit_budget's
and taipan_wardryx_policy's HTTP calls are tested against an httptest mock server that
asserts the exact request/response shapes read out of crates/cloud/src/http.rs and
wardryx's internal/api, respectively (method, path, headers, body shape, and the
not-found/error-response cases each resource's Read/Delete branch on).
What is covered, and what a coverage figure here does not mean
go test -race ./... reaches at least 43% of statements, and features/
declares 12 scenarios, each bound to a test that exists. Both figures are
held by scripts/readme-numbers.sh, which re-measures them and refuses a push
that disagrees, because a number on a README is otherwise a claim with no owner.
The coverage figure is deliberately a floor rather than an exact percentage. An exact one goes red on the commit that adds a test, which teaches people to edit the number instead of reading it.
And it is a floor under the mapping and plumbing layers, not evidence that a
resource works. go test here runs the unit tests only; the acceptance suite
is TF_ACC-gated and does not run, so every Create, Read, Update,
Delete and ImportState sits outside that percentage by construction. What
the number covers is the conversion between Terraform state and the wire, the
provider's configuration precedence, and each resource's Configure. A
perpetual diff, a missing RequiresReplace and an import that does not
round-trip are all invisible to it, and only the acceptance tests below see
them.
features/*.feature exists for the same reason in the other direction: the
generated docs under docs/ say what an attribute IS, and the scenarios say
what the provider is supposed to DO, in the words an operator would use.
Acceptance tests (TF_ACC)
The acceptance tests drive the real provider over the actual Terraform protocol
v6 wire, via terraform-plugin-testing, exercising the tfsdk.Plan/State
handling inside each resource's Create/Read/Update/Delete that the
httptest-mock unit tests above deliberately do not reach. Every one is gated
on TF_ACC (Terraform's own opt-in convention: unset, go test ./... reports
them as SKIP, never FAIL) plus a live backend, so they never affect the
build job or a plain go test.
| test | what it establishes |
|---|---|
TestAccBudgetResource |
a budget applies, re-plans empty, and imports |
TestAccUnitBudgetResource |
the per-unit budget shape, same loop |
TestAccWardryxPolicyResource |
a policy applies, re-plans empty, and imports |
TestAccWardryxPolicyResource_DeletedOutOfBandIsRecreatedNotReportedClean |
a policy deleted behind Terraform's back is recreated, not reported as clean |
TestAccAgentPassportFilesystemModels |
filesystem and model scopes render into the passport |
TestAccAgentPassportResource_Import |
a passport round-trips through import |
TestAccAgentPassportResource_MovingTheOutputPathLeavesNoStaleCopyBehind |
moving output_path removes the previous file rather than leaving a second, older passport on disk |
TestAccAgentPassportResource_MissingParentDirectoryFailsLoudlyRatherThanCreatingIt |
output_path refuses a missing parent directory instead of silently creating one |
That table is held by scripts/readme-numbers.sh in both directions: a test it
names must exist, and a TestAcc in the package must appear in it. The drift
worth catching is the second one. A test gets added, the table still reads like
a complete list, and it is quietly no longer one.
No combined coverage figure is printed here on purpose. The percentage above
is what go test alone reaches; the figure with the acceptance suite included
is higher, and stating it would put a number on this page that nothing
re-reads, which is the exact thing invariant 10 exists to prevent. Measure it
instead, which takes one command and disposable local backends:
TESTACC_GO_FLAGS="-count=1 -run . -coverprofile=/tmp/all.out -coverpkg=./..." \
./scripts/testacc-local.sh && go tool cover -func=/tmp/all.out | tail -1
-count=1 is not optional. Without it an unchanged tree serves a cached result,
and a cached run writes no profile at all, so the measurement produces nothing
rather than failing.
TestAccAgentPassportFilesystemModels and TestAccAgentPassportResource_Import
(internal/provider/passport_resource_test.go) are also TF_ACC-gated but need no live
backend, since taipan_agent_passport calls no API: just a terraform/tofu binary on
PATH. The second is the regression test for taipan_agent_passport's ImportState
(see the resource's own section above): it applies a resource exercising every attribute,
imports it back by file path into a second address, and ImportStateVerify asserts every
attribute round-trips.
Each resource's CheckDestroy asserts what that resource's own Delete actually does,
not a generic "is it gone" check: taipan_budget's and taipan_unit_budget's each assert
their budget survives (Delete is state-only, see each resource's own doc comment),
taipan_wardryx_policy's asserts a real 404 (Delete calls a real DELETE).
Run them against real, disposable local instances with:
make testacc # == ./scripts/testacc-local.sh
This builds and starts a real tokenfuse-cloud (cargo run -p tokenfuse-cloud) and a
real wardryx serve from sibling checkouts (../tokenfuse, ../wardryx by default;
override with TOKENFUSE_REPO_DIR / WARDRYX_REPO_DIR), waits for both /healthz,
points TF_ACC=1 and the four TOKENFUSE_CLOUD_*/WARDRYX_* env vars at them, runs
go test -run '^TestAcc', and always tears both processes down again on exit, success
or failure. The acceptance CI job runs this exact script unmodified, checking out
TAIPANBOX/tokenfuse and TAIPANBOX/wardryx alongside this repo first (all three are
public, so this needs no cross-repo secret or PAT).
Writing these against a real backend, rather than assuming the SDKv2-era acceptance-test
conventions apply unchanged, surfaced two real gaps the httptest-mock unit tests could
not have caught: neither taipan_budget nor (implicitly) taipan_wardryx_policy has an
id attribute the test framework's ImportStateVerify defaults to, so both need
ImportStateId set explicitly (taipan_budget additionally needs
ImportStateVerifyIdentifierAttribute: "run_id", since it has no id at all); and
Wardryx's updated_at has only second-level granularity (time.RFC3339, no fractional
seconds), so a Create immediately followed by an Update in the same test process can
land in the same wall-clock second, requiring a short PreConfig sleep before asserting
updated_at actually changed. taipan_unit_budget shares taipan_budget's exact shape
(no id, only unit_id), so TestAccUnitBudgetResource applies the same
ImportStateVerifyIdentifierAttribute: "unit_id" from the start rather than rediscovering it.
Status
-
taipan_budget: central TokenFuse Cloud spend budget, create/update/read/best-effort delete/import -
taipan_unit_budget: central TokenFuse Cloud monthly budget for one business unit, create/update/read/best-effort delete/import -
taipan_agent_passport: rendered, validated Agent Passport document, optional on-disk output, import from an existing file -
taipan_wardryx_policy: Wardryx policy-as-code document, create/update/read/real delete/import, layered on Wardryx's own file-loaded policies - Every resource supports
terraform import - CI: gofmt, vet, staticcheck, race tests, build, govulncheck, gosec
-
TF_ACC-gated acceptance tests against a live TokenFuse Cloud / Wardryx (make testacc,scripts/testacc-local.sh, CIacceptancejob) -
attestation_detailattribute for detail-bearing attestation methods (spiffe-svid,oidc) -
filesystem/modelsblocks ontaipan_agent_passportfor declared folder access and LLM providers/models/endpoints (agent-passport SPEC.md §4.4-4.5), matching the Genaryx onboard wizard's generated Terraform
Publishing a release
The provider ships to the Terraform Registry as a GPG-signed GitHub release.
.goreleaser.yml cross-compiles every platform, writes the SHA256SUMS
checksum plus terraform-registry-manifest.json, and detach-signs the
checksums; the Registry verifies that signature against a public key you
register. docs/ (generated by tfplugindocs) is what the Registry renders as
the provider documentation.
One-time setup (needs a person with the TAIPANBOX GitHub org and a GPG key). Two of the three are done:
- Done. A GPG key exists and its public half was exported for registration
(
gpg --full-generate-key, thengpg --armor --export <fingerprint>). - Done. That public key is registered under the TAIPANBOX namespace on
registry.terraform.io and this repository is
connected as a provider, which is why
TAIPANBOX/taipan0.1.0 resolves. - Not done. Two repository secrets (Settings -> Secrets and variables ->
Actions):
GPG_PRIVATE_KEY(the ASCII-armored private key) andPASSPHRASE(its passphrase, or leave empty if none). The private key never leaves the repo secret store. Until these exist the tag-triggered path cannot sign anything, so it is not the path to reach for.
Cutting a release. Only the local path has ever produced a release, and 0.1.0 went out that way:
- Locally, needs the private GPG key in your keyring:
export GPG_FINGERPRINT=<your key fingerprint> export GITHUB_TOKEN=<a token with repo scope> goreleaser release --clean - By tag, once step 3 above is done: push a version tag and the
releaseworkflow builds, signs and publishes it.
It has run exactly once, on the v0.1.0 tag, and failed after five seconds withgit tag v0.1.1 git push origin v0.1.1Input required and not supplied: gpg_private_key. The release carrying 0.1.0's thirteen signed archives was made locally afterwards. Actions themselves are active andciis green on every push, so what is missing is the secret, not the runner.
Either way, once the signed release exists on a connected repository the
Registry ingests it within a few minutes, and source = "TAIPANBOX/taipan"
resolves with a plain terraform init. Regenerate docs/ before a release if
resource schemas changed: tfplugindocs generate --provider-name taipan.
This is a public repository, so GitHub Actions standard-runner minutes are free; the release workflow adds no metered cost.
Validation
What the unit and acceptance tests actually cover, the two gaps that only a real
backend could surface, and the honest scope (notably: taipan_budget's Delete
is state-only, because the API has no delete):
VALIDATION.md.
License
Apache-2.0, see LICENSE.