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:
parent
01b70dcbaa
commit
6d1e99d6ae
@ -16,7 +16,7 @@ Enable Remote Desktop + a web based client on Windows workspaces, powered by [de
|
|||||||
module "windows_rdp" {
|
module "windows_rdp" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/windows-rdp/coder"
|
source = "registry.coder.com/coder/windows-rdp/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = resource.coder_agent.main.id
|
agent_id = resource.coder_agent.main.id
|
||||||
resource_id = resource.aws_instance.dev.id
|
resource_id = resource.aws_instance.dev.id
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ module "windows_rdp" {
|
|||||||
module "windows_rdp" {
|
module "windows_rdp" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/windows-rdp/coder"
|
source = "registry.coder.com/coder/windows-rdp/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = resource.coder_agent.main.id
|
agent_id = resource.coder_agent.main.id
|
||||||
resource_id = resource.aws_instance.dev.id
|
resource_id = resource.aws_instance.dev.id
|
||||||
}
|
}
|
||||||
@ -46,12 +46,25 @@ module "windows_rdp" {
|
|||||||
module "windows_rdp" {
|
module "windows_rdp" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/windows-rdp/coder"
|
source = "registry.coder.com/coder/windows-rdp/coder"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
agent_id = resource.coder_agent.main.id
|
agent_id = resource.coder_agent.main.id
|
||||||
resource_id = resource.google_compute_instance.dev[0].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
|
## Roadmap
|
||||||
|
|
||||||
- [ ] Test on Microsoft Azure.
|
- [ ] Test on Microsoft Azure.
|
||||||
|
|||||||
@ -51,6 +51,12 @@ variable "admin_password" {
|
|||||||
sensitive = true
|
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" {
|
resource "coder_script" "windows-rdp" {
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
display_name = "windows-rdp"
|
display_name = "windows-rdp"
|
||||||
@ -59,6 +65,7 @@ resource "coder_script" "windows-rdp" {
|
|||||||
script = templatefile("${path.module}/powershell-installation-script.tftpl", {
|
script = templatefile("${path.module}/powershell-installation-script.tftpl", {
|
||||||
admin_username = var.admin_username
|
admin_username = var.admin_username
|
||||||
admin_password = var.admin_password
|
admin_password = var.admin_password
|
||||||
|
devolutions_gateway_version = var.devolutions_gateway_version
|
||||||
|
|
||||||
# Wanted to have this be in the powershell template file, but Terraform
|
# Wanted to have this be in the powershell template file, but Terraform
|
||||||
# doesn't allow recursive calls to the templatefile function. Have to feed
|
# doesn't allow recursive calls to the templatefile function. Have to feed
|
||||||
|
|||||||
@ -21,7 +21,7 @@ function Configure-RDP {
|
|||||||
function Install-DevolutionsGateway {
|
function Install-DevolutionsGateway {
|
||||||
# Define the module name and version
|
# Define the module name and version
|
||||||
$moduleName = "DevolutionsGateway"
|
$moduleName = "DevolutionsGateway"
|
||||||
$moduleVersion = "2024.1.5"
|
$moduleVersion = "${devolutions_gateway_version}"
|
||||||
|
|
||||||
# Install the module with the specified version for all users
|
# Install the module with the specified version for all users
|
||||||
# This requires administrator privileges
|
# This requires administrator privileges
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user