Skip to content

Commit 523ad9f

Browse files
authored
update windows-rdp to take share variable (coder#274)
* update windows-rdp to take share variable * of course I forgot to run fmt * make 'owner' default for share * update share var validation
1 parent 7e0eacf commit 523ad9f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

bun.lockb

336 Bytes
Binary file not shown.

windows-rdp/main.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
type TestVariables = Readonly<{
1010
agent_id: string;
1111
resource_id: string;
12+
share?: string;
1213
admin_username?: string;
1314
admin_password?: string;
1415
}>;

windows-rdp/main.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ terraform {
99
}
1010
}
1111

12+
variable "share" {
13+
type = string
14+
default = "owner"
15+
validation {
16+
condition = var.share == "owner" || var.share == "authenticated" || var.share == "public"
17+
error_message = "Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
18+
}
19+
}
20+
1221
variable "agent_id" {
1322
type = string
1423
description = "The ID of a Coder agent."
@@ -53,6 +62,7 @@ resource "coder_script" "windows-rdp" {
5362

5463
resource "coder_app" "windows-rdp" {
5564
agent_id = var.agent_id
65+
share = var.share
5666
slug = "web-rdp"
5767
display_name = "Web RDP"
5868
url = "http://localhost:7171"

0 commit comments

Comments
 (0)