hashicorp / hashicorp/packer-plugin-azure
ARM Builder: Windows builds default to SSH communicator type when communicator is unset
- Dominant language
- Go
- Stars
- 63
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
Similar to https://github.com/hashicorp/packer-plugin-azure/issues/415
Whenever the communicator field is unset Windows will try to connect via SSH instead of WinRM, this fails because SSH on Windows is not configured to work by default.
This happens because of this logic in the packer-plugin-sdk https://github.com/hashicorp/packer-plugin-sdk/blob/9c1d2437dcbde2571b2a8f5d8ce280dce76a377b/communicator/config.go#L461-L463
To solve this either force users to specify a communicator, or forcibly override the default to WinRM for Windows builds, this would need to be done before this Prepare call https://github.com/hashicorp/packer-plugin-azure/blob/738e7aefc89609a33d0139e1fc838825aac1f05e/builder/azure/arm/config.go#L874-L875
Contributor guide
Research direction
Start with communicator/config.go in the packer-plugin-sdk to understand the unset-communicator default, then inspect builder/azure/arm/config.go around the referenced Prepare call. Reproduce a Windows ARM build with no communicator configured and verify that it selects WinRM rather than SSH without requiring users to set the communicator explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100