windows_wait_for
Experimental. Waits until a path exists, a service is running or a TCP port is listening on a Windows host. Refresh checks again, so a later apply waits again if it stopped.
Experimental. Windows support is new, and this module may change between releases.
Use windows_wait_for to pause a circuit until a path exists, a service is running or a TCP port is listening on a Windows host. It keeps trying through a reboot, so it’s the natural step to follow windows_reboot.
Example usage
Section titled “Example usage”step "web_up" { windows_wait_for { service = "W3SVC" timeout = "10m" }}step "app_listening" { windows_wait_for { port = 8080 }}step "app_ready" { windows_wait_for { path = "C:\\app\\ready" timeout = "1m" }}Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
path |
string | No | Path to wait for, such as C:\app\ready. Set exactly one of path, service and port. |
port |
number | No | TCP port to wait for a listener on. Set exactly one of path, service and port. |
service |
string | No | Name of a service to wait for until it is running. Set exactly one of path, service and port. |
timeout |
string | No | How long to wait. Defaults to “5m”. |
Read-only attributes
Section titled “Read-only attributes”Conn3x sets these; reference them as conn3x_windows_wait_for.<circuit>__<step>["<host>"].<name>.
| Name | Type | Description |
|---|---|---|
in_sync |
bool | Whether it was ready at the last refresh. |
revision |
string | Changes each time Conn3x changes this on the host. Handlers watch it. |
A step lowers to the conn3x_windows_wait_for resource, one instance per host, and connects with its circuit’s ssh block.
How it works
Section titled “How it works”Waiting. Conn3x checks every two seconds, and fails the step if it isn’t ready after timeout, which defaults to "5m". Each check starts PowerShell in a new session. If the host can’t be reached yet, that counts as not ready.
Reading. Every plan checks again. If the path is gone, the service stopped or nothing listens on the port any more, the plan shows the step out of sync and the next apply waits again.
Validation. Set exactly one of path, service and port. path must be a drive-letter or UNC path.
Removal
Section titled “Removal”Deleting a windows_wait_for step does nothing on the host.