watch
Wait for drift on a workspace: objects the engine saw change outside Turf between convergences, confirmed and classified as drift notices (status shows them too). Returns when there is something new to act on — an open drift notice the cursor has not reported — with outcome drift: the drift block (each address with its class and changed attribute paths, never values; new ones marked), a cursor, and next: up, at whose plan gate plan with refresh_drift: true reads only what drifted. A notice clearing wakes nobody. Without a cursor anything open is new and the call returns at once (a catch-up: the note says when the notices were already open before the call); cursor ‘now’ waits only for what opens after the call begins. Waits server-side up to the server’s deadline (the waiting note says how long; progress notifications go out meanwhile when the call carries a progress token), then returns outcome waiting with a new cursor and next: the same watch — call it again. for bounds the whole watch (outcome quiet, ended, when it passes with nothing new); quiet_for holds the drift back until it has been still that long; wake_on picks the classes. Observes only: it never changes drift settings. A workspace nothing watches returns at once, outcome unwatched, ended, with no next and a note saying why (no state yet, an engine without drift detection, detection never turned on, or turned off): do not call watch on it again.
Tiers: read · plan · apply · full
Annotations
Section titled “Annotations”| Annotation | Value |
|---|---|
title |
Watch for drift |
readOnlyHint |
true |
destructiveHint |
false |
idempotentHint |
true |
openWorldHint |
false |
Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
workspace_alias |
string | no | Workspace alias, as ‘open’ named it. Omit for the workspace opened without an alias (‘default’). |
cursor |
string | no | The cursor from the last watch result: what it reported, so the watch wakes only on what is new since. ‘now’: take what is open as this call begins as reported, and wait only for what opens after. Omit to catch up: anything open is new, and the call returns at once. |
quiet_for |
integer | no | Seconds the open drift must have been still (no new signal, no new read, by the engine’s clock) before the watch returns it (default 0). Use it to let a burst settle, or to leave room for someone who may be mid-change. |
wake_on |
string | no | Which drift notices wake the watch: ‘confirmed’ (default) — gone, configured, referenced, contended and uncovered, leaving unconfirmed ones to the engine’s confirm (unless nothing will confirm them — no standing seal, or confirm turned off — then those too); ‘any’ — every class. |
for |
integer | no | Total seconds to keep watching, counted from the first call of this watch (the cursor carries it). Past it with nothing new the watch ends ‘quiet’. Omit to watch until something drifts. |
Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.
© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub