update windows-rdp to take share variable (#274)

* update windows-rdp to take share variable

* of course I forgot to run fmt

* make 'owner' default for share

* update share var validation
This commit is contained in:
Benjamin Peinhardt
2024-07-24 16:26:45 -05:00
committed by GitHub
parent 7e0eacf1f4
commit 523ad9fe23
3 changed files with 11 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View File

@@ -9,6 +9,7 @@ import {
type TestVariables = Readonly<{
agent_id: string;
resource_id: string;
share?: string;
admin_username?: string;
admin_password?: string;
}>;

View File

@@ -9,6 +9,15 @@ terraform {
}
}
variable "share" {
type = string
default = "owner"
validation {
condition = var.share == "owner" || var.share == "authenticated" || var.share == "public"
error_message = "Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
}
}
variable "agent_id" {
type = string
description = "The ID of a Coder agent."
@@ -53,6 +62,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"