Skip to content

Commit c0832a1

Browse files
feat(local-windows-rdp): add RDP setup script resource and output
1 parent 14ea2b7 commit c0832a1

File tree

1 file changed

+17
-0
lines changed
  • registry/coder/modules/local-windows-rdp

1 file changed

+17
-0
lines changed

registry/coder/modules/local-windows-rdp/main.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ locals {
5252

5353
data "coder_workspace" "me" {}
5454

55+
resource "coder_script" "rdp_setup" {
56+
agent_id = var.agent_id
57+
display_name = "Configure RDP"
58+
icon = "/icon/desktop.svg"
59+
script = templatefile("${path.module}/configure-rdp.ps1", {
60+
username = var.username
61+
password = var.password
62+
})
63+
run_on_start = true
64+
}
65+
5566
resource "coder_app" "rdp_desktop" {
5667
agent_id = var.agent_id
5768
slug = "rdp-desktop"
@@ -68,3 +79,9 @@ output "app" {
6879
sensitive = true
6980
}
7081

82+
output "script" {
83+
description = "The RDP configuration script resource"
84+
value = coder_script.rdp_setup
85+
sensitive = true
86+
}
87+

0 commit comments

Comments
 (0)