Skip to content

update windows-rdp to take share variable #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions windows-rdp/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
type TestVariables = Readonly<{
agent_id: string;
resource_id: string;
share?: string;
admin_username?: string;
admin_password?: string;
}>;
Expand Down
10 changes: 10 additions & 0 deletions windows-rdp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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"
Expand Down