Skip to content

Commit f82c7fd

Browse files
committed
test: set up NuGet in advance
1 parent 05a20a9 commit f82c7fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

windows-rdp/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resource "coder_script" "windows-rdp" {
3434
agent_id = var.agent_id
3535
display_name = "windows-rdp"
3636
icon = "https://svgur.com/i/158F.svg" # TODO: add to Coder icons
37-
script = <<EOF
37+
script = <<EOF
3838
function Set-AdminPassword {
3939
param (
4040
[string]$adminPassword
@@ -62,6 +62,7 @@ resource "coder_script" "windows-rdp" {
6262
6363
# Install the module with the specified version for all users
6464
# This requires administrator privileges
65+
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
6566
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
6667
6768
# Construct the module path for system-wide installation
@@ -116,7 +117,7 @@ ${templatefile("${path.module}/devolutions-patch.js", {
116117
117118
EOF
118119

119-
run_on_start = true
120+
run_on_start = true
120121
}
121122

122123
resource "coder_app" "windows-rdp" {

0 commit comments

Comments
 (0)