feat: add configurable Devolutions Gateway version for windows-rdp module (#148)

Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
Co-authored-by: matifali <10648092+matifali@users.noreply.github.com>
This commit is contained in:
blink-so[bot] 2025-06-11 23:14:30 +05:00 committed by GitHub
parent 01b70dcbaa
commit 6d1e99d6ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 26 additions and 6 deletions

View File

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

View File

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

View File

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