feat: add Windows RDP keepalive monitor#898
Conversation
Previously the Windows RDP module configured desktop access but did not report activity while an RDP session was connected. This commit adds a small agent-token based monitor so RDP usage can extend the workspace. - Add keepalive variables and workspace lookup in `windows-rdp/main.tf` - Start a PowerShell monitor that checks established RDP sessions - Document the keepalive settings and cover rendered script output
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15cc26ca1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| variable "keepalive_enabled" { | ||
| type = bool | ||
| default = true |
There was a problem hiding this comment.
Make keepalive opt-in by default
Setting keepalive_enabled to true changes behavior for all existing windows-rdp users on their next apply: any active RDP connection will continuously extend deadlines and can prevent expected auto-stop behavior, increasing runtime/cost without explicit user action. Because this feature is described as opt-in, the default should remain disabled to avoid a backward-incompatible rollout.
Useful? React with 👍 / 👎.
| $scriptDir = "C:\coder" | ||
| $scriptPath = Join-Path $scriptDir "rdp-keepalive.ps1" | ||
| $logPath = Join-Path $scriptDir "rdp-keepalive.log" |
There was a problem hiding this comment.
Store keepalive artifacts in the module data root
The keepalive monitor writes runtime script/log files to C:\coder, which bypasses the repository’s required module data layout ($HOME/.coder-modules/<namespace>/<module>/...) for module-managed artifacts. This makes logs/scripts harder to discover consistently and breaks the standard location contract used for support and maintenance.
Useful? React with 👍 / 👎.
Summary
windows-rdpmoduleTesting
PATH=/tmp/coder-test-bin:/tmp/terraform-bin:$PATH npm exec --yes --package=bun@latest -- bun test registry/coder/modules/windows-rdp/main.test.ts/tmp/terraform-bin/terraform fmt -check -diff /tmp/coder-registry/registry/coder/modules/windows-rdp/main.tf/tmp/terraform-bin/terraform -chdir=/tmp/coder-registry/registry/coder/modules/windows-rdp validatenpx prettier --check registry/coder/modules/windows-rdp/README.md registry/coder/modules/windows-rdp/main.test.tsgit diff --checkFixes #200
/claim #200