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
pull/277/head
Benjamin Peinhardt 9 months ago committed by GitHub
parent 7e0eacf1f4
commit 523ad9fe23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

Binary file not shown.

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

@ -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"

Loading…
Cancel
Save