diff --git a/enos/modules/aws_windows_client/main.tf b/enos/modules/aws_windows_client/main.tf index 47ede6016d..5e936da058 100644 --- a/enos/modules/aws_windows_client/main.tf +++ b/enos/modules/aws_windows_client/main.tf @@ -325,7 +325,7 @@ resource "archive_file" "boundary_src_zip" { type = "zip" source_dir = var.boundary_src_path output_path = "${path.root}/.terraform/tmp/boundary-src.zip" - excludes = ["**/enos/**", "**/node_modules/**", "bin/**", "**/.git/**", "plugins/**/*.gz", "website/**"] + excludes = ["**/enos/**", "**/node_modules/**", "bin/**", "**/.git/**", "plugins/**/*.gz", "website/**", "**/ui/.tmp/**"] } resource "enos_local_exec" "add_boundary_src" { @@ -375,7 +375,9 @@ resource "enos_local_exec" "run_powershell_script" { enos_local_exec.wait_for_ssh, ] - inline = ["ssh -i ${abspath(local_sensitive_file.private_key.filename)} -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no Administrator@${aws_instance.client.public_ip} ${local.test_dir}/${basename(local_file.powershell_script[0].filename)}"] + # running this script as test_username so that go modules will be set up for + # the user used for RDP tests + inline = ["ssh -i ${abspath(local_sensitive_file.private_key.filename)} -o IdentitiesOnly=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${local.test_username}@${aws_instance.client.public_ip} ${local.test_dir}/${basename(local_file.powershell_script[0].filename)}"] } # used for debug diff --git a/enos/modules/aws_windows_client/scripts/setup.ps1 b/enos/modules/aws_windows_client/scripts/setup.ps1 index fa60d78d75..915c0a15f2 100644 --- a/enos/modules/aws_windows_client/scripts/setup.ps1 +++ b/enos/modules/aws_windows_client/scripts/setup.ps1 @@ -2,10 +2,12 @@ # SPDX-License-Identifier: BUSL-1.1 # Unzip Boundary CLI to the same directory +Write-Host "Unzipping Boundary CLI..." $destination = Split-Path -Path ${boundary_cli_zip_path} Expand-Archive -Path ${boundary_cli_zip_path} -DestinationPath $destination -Force # Unzip boundary src to new directory +Write-Host "Unzipping Boundary source code..." $base = [System.IO.Path]::GetFileNameWithoutExtension("${boundary_src_zip_path}") $src_destination = Join-Path (Split-Path ${boundary_src_zip_path}) $base Expand-Archive -Path ${boundary_src_zip_path} -DestinationPath $src_destination -Force @@ -58,11 +60,13 @@ choco install cmake --version 3.31.8 -y refreshenv # Set the github token if provided +Write-Host "Checking if GitHub token is provided..." if ("${github_token}" -ne "") { # configure git to be able to download from private repos git config --system url."https://oauth2:${github_token}@github.com".insteadOf "https://github.com" # download opencv artifact if available + Write-Host "Downloading OpenCV artifact.." [Environment]::SetEnvironmentVariable("GITHUB_TOKEN", "${github_token}", [EnvironmentVariableTarget]::Machine) choco install gh -y refreshenv @@ -100,6 +104,7 @@ if ("${github_token}" -ne "") { ) # go mod download + Write-Host "Downloading Go modules at $src_destination..." cd $src_destination go mod download }