update windows-rdp to take share variable

pull/274/head
Benjamin Peinhardt 12 months ago
parent 7e0eacf1f4
commit d2a34e2d5e

@ -7,6 +7,7 @@ import {
} from "../test"; } from "../test";
type TestVariables = Readonly<{ type TestVariables = Readonly<{
share: string;
agent_id: string; agent_id: string;
resource_id: string; resource_id: string;
admin_username?: string; admin_username?: string;
@ -42,10 +43,12 @@ describe("Web RDP", async () => {
testRequiredVariables<TestVariables>(import.meta.dir, { testRequiredVariables<TestVariables>(import.meta.dir, {
agent_id: "foo", agent_id: "foo",
resource_id: "bar", resource_id: "bar",
share: "owner"
}); });
it("Has the PowerShell script install Devolutions Gateway", async () => { it("Has the PowerShell script install Devolutions Gateway", async () => {
const state = await runTerraformApply<TestVariables>(import.meta.dir, { const state = await runTerraformApply<TestVariables>(import.meta.dir, {
share: "owner",
agent_id: "foo", agent_id: "foo",
resource_id: "bar", resource_id: "bar",
}); });
@ -93,6 +96,7 @@ describe("Web RDP", async () => {
{ {
agent_id: "foo", agent_id: "foo",
resource_id: "bar", resource_id: "bar",
share: "owner"
}, },
); );
@ -111,6 +115,7 @@ describe("Web RDP", async () => {
const customizedState = await runTerraformApply<TestVariables>( const customizedState = await runTerraformApply<TestVariables>(
import.meta.dir, import.meta.dir,
{ {
share: "owner",
agent_id: "foo", agent_id: "foo",
resource_id: "bar", resource_id: "bar",
admin_username: customAdminUsername, admin_username: customAdminUsername,

@ -9,6 +9,11 @@ terraform {
} }
} }
variable "share" {
type = string
description = "The share level of the Coder app. Either 'owner' | 'authenticated' | 'public' "
}
variable "agent_id" { variable "agent_id" {
type = string type = string
description = "The ID of a Coder agent." description = "The ID of a Coder agent."
@ -53,6 +58,7 @@ resource "coder_script" "windows-rdp" {
resource "coder_app" "windows-rdp" { resource "coder_app" "windows-rdp" {
agent_id = var.agent_id agent_id = var.agent_id
share = var.share
slug = "web-rdp" slug = "web-rdp"
display_name = "Web RDP" display_name = "Web RDP"
url = "http://localhost:7171" url = "http://localhost:7171"

Loading…
Cancel
Save