takoform_worker_version
Immutable executable snapshot of one Module Worker: a bundle, a runtime compatibility date, declared handlers, non-secret vars, and the typed capability bindings the code may use. A change is a new Worker Version; traffic moves only through Worker Deployments.
This is a revision resource: an immutable snapshot. It is create-only — every desired attribute forces replacement, and rollback means pointing a deployment at an earlier revision, never editing this one.
This resource speaks the Host API v1alpha3 lane and requires provider v2.1.0 or later (source candidate; not yet published). The configured host selects and operates the concrete backend; no attribute names a vendor, target, credential, price, or implementation. See the complete example.
Arguments
name(String, required, forces replacement) — Portable resource name (metadata.name).worker(String, required, forces replacement) — Module Worker identity this version belongs to. Set the name of the targetModuleWorkerresource.bundle(String, required, forces replacement) — Worker Bundle carrying the exact module bytes this version executes. Set the name of the targetWorkerBundleresource.compatibility_date(String, required, forces replacement) — Runtime compatibility date fixing default runtime behavior for this version.compatibility_flags(Set of String, optional, forces replacement) — Closed runtime compatibility flags enabled for this version. One ofnodejs_compat.handlers(Set of String, required, forces replacement) — Module event handlers this version exports. A host rejects an attachment whose event kind is not declared here. One offetch,scheduled,queue,tail.vars_json(String, optional, forces replacement) — Non-secret configuration values projected into the module environment. Sensitive material never enters portable state. Authored as one JSON object string (for examplejsonencode({...})); the provider sends the parsed object.kv_bindings(List of Object, optional, forces replacement) — Typed module-worker.edge-kv bindings projecting the edge.kv API under JavaScript identifier names. Each entry declaresname(a JavaScript identifier) andtarget_name(the targetEdgeKVNamespaceresource name); the wire carries the typedresourcereference.bucket_bindings(List of Object, optional, forces replacement) — Typed module-worker.object-bucket bindings projecting the edge.objects API. Each entry declaresname(a JavaScript identifier) andtarget_name(the targetObjectBucketresource name); the wire carries the typedresourcereference.sqlite_bindings(List of Object, optional, forces replacement) — Typed module-worker.sqlite bindings projecting the edge.sql API. Each entry declaresname(a JavaScript identifier) andtarget_name(the targetSQLiteDatabaseresource name); the wire carries the typedresourcereference.queue_producer_bindings(List of Object, optional, forces replacement) — Typed module-worker.queue-producer bindings projecting only send and sendBatch. Each entry declaresname(a JavaScript identifier) andtarget_name(the targetAtLeastOnceQueueresource name); the wire carries the typedresourcereference.service_bindings(List of Object, optional, forces replacement) — Typed module-worker.service bindings projecting worker.service fetch toward another Module Worker. Each entry declaresname(a JavaScript identifier) andtarget_name(the targetModuleWorkerresource name); the wire carries the typedresourcereference.required_sensitive_vars(Set of String, optional, forces replacement) — Names of sensitive values this version requires the host to supply out-of-band. Only the names are portable state; values travel through each host's own sealed path.space(String, optional, forces replacement) — Exact opaque SpaceID; overrides the provider default.create_timeout/delete_timeout(String, optional) — Go durations bounding each operation (defaults20m/30m). Changing only these provider-side timeouts is applied in place without any host call.
Read-only attributes
uid— host-issued immutable resource identity; delete and re-create yields a new UID.generation— desired-state generation; increments only when the portable desired spec changes; a revision has no spec-changing update — every desired attribute forces replacement instead.revision— representation revision; increments whenever the representation changes — a spec-changing update, new status, or new outputs. Deletes fence on it viaIf-Match.ready— true when the closedReadycondition reportsTrue.outputs_json— JSON-serializedstatus.outputsdocument ("{}"when empty).form_api_version,form_kind,form_definition_version,form_schema_digest— the exact immutable FormRef this state is bound to; reads dispatch on it.form_package_digest— audit-only package provenance; never part of resource identity, queries, or fences.
Provided interfaces
worker.service@1.0.0— the exact Interface contract this Form's service exposes.
Accepted bindings
module-worker.edge-kv@1.0.0module-worker.object-bucket@1.0.0module-worker.sqlite@1.0.0module-worker.queue-producer@1.0.0module-worker.service@1.0.0
Outward capability use is a typed binding held by this revision; inward activation (routes, domains, cron, queue consumption) is a separate attachment resource. The two are never merged.
Import
terraform import takoform_worker_version.example NAME
terraform import takoform_worker_version.example SPACE/NAME