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:
committed by
GitHub
parent
7e0eacf1f4
commit
523ad9fe23
@@ -9,6 +9,7 @@ import {
|
|||||||
type TestVariables = Readonly<{
|
type TestVariables = Readonly<{
|
||||||
agent_id: string;
|
agent_id: string;
|
||||||
resource_id: string;
|
resource_id: string;
|
||||||
|
share?: string;
|
||||||
admin_username?: string;
|
admin_username?: string;
|
||||||
admin_password?: 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" {
|
variable "agent_id" {
|
||||||
type = string
|
type = string
|
||||||
description = "The ID of a Coder agent."
|
description = "The ID of a Coder agent."
|
||||||
@@ -53,6 +62,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"
|
||||||
|
|||||||
Reference in New Issue
Block a user