diff --git a/windows-rdp/main.test.ts b/windows-rdp/main.test.ts index 24ce1049..381f12d3 100644 --- a/windows-rdp/main.test.ts +++ b/windows-rdp/main.test.ts @@ -7,6 +7,7 @@ import { } from "../test"; type TestVariables = Readonly<{ + share: string; agent_id: string; resource_id: string; admin_username?: string; @@ -42,10 +43,12 @@ describe("Web RDP", async () => { testRequiredVariables(import.meta.dir, { agent_id: "foo", resource_id: "bar", + share: "owner" }); it("Has the PowerShell script install Devolutions Gateway", async () => { const state = await runTerraformApply(import.meta.dir, { + share: "owner", agent_id: "foo", resource_id: "bar", }); @@ -93,6 +96,7 @@ describe("Web RDP", async () => { { agent_id: "foo", resource_id: "bar", + share: "owner" }, ); @@ -111,6 +115,7 @@ describe("Web RDP", async () => { const customizedState = await runTerraformApply( import.meta.dir, { + share: "owner", agent_id: "foo", resource_id: "bar", admin_username: customAdminUsername, diff --git a/windows-rdp/main.tf b/windows-rdp/main.tf index fb09c48f..1cafa493 100644 --- a/windows-rdp/main.tf +++ b/windows-rdp/main.tf @@ -9,6 +9,11 @@ terraform { } } +variable "share" { + type = string + description = "The share level of the Coder app. Either 'owner' | 'authenticated' | 'public' " +} + variable "agent_id" { type = string description = "The ID of a Coder agent." @@ -53,6 +58,7 @@ resource "coder_script" "windows-rdp" { resource "coder_app" "windows-rdp" { agent_id = var.agent_id + share = var.share slug = "web-rdp" display_name = "Web RDP" url = "http://localhost:7171"