Skip to content

Commit 6d1e99d

Browse files
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 <[email protected]>
1 parent 01b70dc commit 6d1e99d

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

registry/coder/modules/windows-rdp/README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Enable Remote Desktop + a web based client on Windows workspaces, powered by [de
1616
module "windows_rdp" {
1717
count = data.coder_workspace.me.start_count
1818
source = "registry.coder.com/coder/windows-rdp/coder"
19-
version = "1.1.0"
19+
version = "1.2.0"
2020
agent_id = resource.coder_agent.main.id
2121
resource_id = resource.aws_instance.dev.id
2222
}
@@ -34,7 +34,7 @@ module "windows_rdp" {
3434
module "windows_rdp" {
3535
count = data.coder_workspace.me.start_count
3636
source = "registry.coder.com/coder/windows-rdp/coder"
37-
version = "1.1.0"
37+
version = "1.2.0"
3838
agent_id = resource.coder_agent.main.id
3939
resource_id = resource.aws_instance.dev.id
4040
}
@@ -46,12 +46,25 @@ module "windows_rdp" {
4646
module "windows_rdp" {
4747
count = data.coder_workspace.me.start_count
4848
source = "registry.coder.com/coder/windows-rdp/coder"
49-
version = "1.1.0"
49+
version = "1.2.0"
5050
agent_id = resource.coder_agent.main.id
5151
resource_id = resource.google_compute_instance.dev[0].id
5252
}
5353
```
5454

55+
### With Custom Devolutions Gateway Version
56+
57+
```tf
58+
module "windows_rdp" {
59+
count = data.coder_workspace.me.start_count
60+
source = "registry.coder.com/coder/windows-rdp/coder"
61+
version = "1.2.0"
62+
agent_id = resource.coder_agent.main.id
63+
resource_id = resource.aws_instance.dev.id
64+
devolutions_gateway_version = "2025.1.6" # Specify a specific version
65+
}
66+
```
67+
5568
## Roadmap
5669

5770
- [ ] Test on Microsoft Azure.

registry/coder/modules/windows-rdp/main.tf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,21 @@ variable "admin_password" {
5151
sensitive = true
5252
}
5353

54+
variable "devolutions_gateway_version" {
55+
type = string
56+
default = "2025.2.1"
57+
description = "Version of Devolutions Gateway to install. Defaults to the latest available version."
58+
}
59+
5460
resource "coder_script" "windows-rdp" {
5561
agent_id = var.agent_id
5662
display_name = "windows-rdp"
5763
icon = "/icon/desktop.svg"
5864

5965
script = templatefile("${path.module}/powershell-installation-script.tftpl", {
60-
admin_username = var.admin_username
61-
admin_password = var.admin_password
66+
admin_username = var.admin_username
67+
admin_password = var.admin_password
68+
devolutions_gateway_version = var.devolutions_gateway_version
6269

6370
# Wanted to have this be in the powershell template file, but Terraform
6471
# doesn't allow recursive calls to the templatefile function. Have to feed

registry/coder/modules/windows-rdp/powershell-installation-script.tftpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function Configure-RDP {
2121
function Install-DevolutionsGateway {
2222
# Define the module name and version
2323
$moduleName = "DevolutionsGateway"
24-
$moduleVersion = "2024.1.5"
24+
$moduleVersion = "${devolutions_gateway_version}"
2525

2626
# Install the module with the specified version for all users
2727
# This requires administrator privileges

0 commit comments

Comments
 (0)