diff --git a/registry/coder/modules/windows-rdp/README.md b/registry/coder/modules/windows-rdp/README.md index c353c709f..cad96407b 100644 --- a/registry/coder/modules/windows-rdp/README.md +++ b/registry/coder/modules/windows-rdp/README.md @@ -16,7 +16,7 @@ Enable Remote Desktop + a web based client on Windows workspaces, powered by [de module "windows_rdp" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/windows-rdp/coder" - version = "1.1.0" + version = "1.2.0" agent_id = resource.coder_agent.main.id resource_id = resource.aws_instance.dev.id } @@ -34,7 +34,7 @@ module "windows_rdp" { module "windows_rdp" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/windows-rdp/coder" - version = "1.1.0" + version = "1.2.0" agent_id = resource.coder_agent.main.id resource_id = resource.aws_instance.dev.id } @@ -46,12 +46,25 @@ module "windows_rdp" { module "windows_rdp" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/windows-rdp/coder" - version = "1.1.0" + version = "1.2.0" agent_id = resource.coder_agent.main.id resource_id = resource.google_compute_instance.dev[0].id } ``` +### With Custom Devolutions Gateway Version + +```tf +module "windows_rdp" { + count = data.coder_workspace.me.start_count + source = "registry.coder.com/coder/windows-rdp/coder" + version = "1.2.0" + agent_id = resource.coder_agent.main.id + resource_id = resource.aws_instance.dev.id + devolutions_gateway_version = "2025.1.6" # Specify a specific version +} +``` + ## Roadmap - [ ] Test on Microsoft Azure. diff --git a/registry/coder/modules/windows-rdp/main.tf b/registry/coder/modules/windows-rdp/main.tf index b7ed9bcd2..b610c52cd 100644 --- a/registry/coder/modules/windows-rdp/main.tf +++ b/registry/coder/modules/windows-rdp/main.tf @@ -51,14 +51,21 @@ variable "admin_password" { sensitive = true } +variable "devolutions_gateway_version" { + type = string + default = "2025.2.1" + description = "Version of Devolutions Gateway to install. Defaults to the latest available version." +} + resource "coder_script" "windows-rdp" { agent_id = var.agent_id display_name = "windows-rdp" icon = "/icon/desktop.svg" script = templatefile("${path.module}/powershell-installation-script.tftpl", { - admin_username = var.admin_username - admin_password = var.admin_password + admin_username = var.admin_username + admin_password = var.admin_password + devolutions_gateway_version = var.devolutions_gateway_version # Wanted to have this be in the powershell template file, but Terraform # doesn't allow recursive calls to the templatefile function. Have to feed diff --git a/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl b/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl index 1b7ab487b..c30535842 100644 --- a/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl +++ b/registry/coder/modules/windows-rdp/powershell-installation-script.tftpl @@ -21,7 +21,7 @@ function Configure-RDP { function Install-DevolutionsGateway { # Define the module name and version $moduleName = "DevolutionsGateway" -$moduleVersion = "2024.1.5" +$moduleVersion = "${devolutions_gateway_version}" # Install the module with the specified version for all users # This requires administrator privileges