Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build.Password is not set when using SSH on windows #444

Open
boussaffawalid opened this issue Dec 16, 2023 · 0 comments
Open

Build.Password is not set when using SSH on windows #444

boussaffawalid opened this issue Dec 16, 2023 · 0 comments

Comments

@boussaffawalid
Copy link

Overview of the Issue

When using the new SSH on Windows functionality, it doesn't appear to be setting build.Password (that is recommend here).

It seems to be the same issue as hashicorp/packer-plugin-azure#267

Reproduction Steps

using this provisioner

  provisioner "powershell" {
    environment_vars  = ["WINDOWSPASS=${build.Password}"]
    scripts     = [demo.ps1"]
  }

with a demo.ps1

Write-Host "Windows Administrator password is: $Env:WINDOWSPASS"
Current output
 Using SSH communicator to connect: x.x.x.x
 Waiting for SSH to become available...
 Connected to SSH!
 Provisioning with Powershell...
 Provisioning with powershell script: demo.ps1
 Windows Administrator password is:

Windows password is empty!

Plugin and Packer version

packer version: Packer v1.10.0
packer-plugin-amazon version: 1.2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants