Resource Kinds
Tamer-managed Cloudflare resources are declared on a worker under resources. Each kind expands to a Wrangler binding plus a state row keyed by derived name.
Supported kinds
| Kind | Config key | Binding type |
|---|---|---|
| D1 | d1 | d1_databases[] |
| R2 | r2 | r2_buckets[] |
| KV | kv | kv_namespaces[] |
| Queues | queues | queues.producers[] |
| Hyperdrive | hyperdrive | hyperdrive[] |
| Vectorize | vectorize | vectorize[] |
| AI Gateway | aiGateway | (no wrangler binding — account-scoped) |
| Pipelines | pipelines | pipelines[] |
| Workflows | workflows | workflows[] |
| Durable Objects | durableObjects (+ worker doMigrations) | durable_objects.bindings[] + migrations[] |
| Secrets Store | secretsStores | (store container — account-scoped) |
| DNS Records | (stack root) | (no wrangler binding) |
| Dispatch Namespace | (stack root, wfp.namespaces) | (no wrangler binding — derived name {product}-{env}) |
| Worker Route | (derived from tamerRoutes) | (applied via API, not in wrangler.json) |
Adding a new resource kind
Every resource is wired through a single registry at src/core/registry/registry.ts. To add a new kind:
- Add config + state types to
src/types.ts - Implement the per-feature module under
src/features/<kind>/ - Author
<kind>.module.tsexporting aResourceModule - Append to
resourceModulesinsrc/core/registry/registry.ts
Every command picks the kind up automatically — no command edits needed.
See the README for per-kind configuration details and notes.