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

Ensure build.password parameter gets set to generated password for SSH Communicator when no SSH password is set #268

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

matt-richardson
Copy link
Contributor

The problem

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

The solution

As discussed in #267 (comment), this change sets the c.Comm.SSHPassword to the generated password, which is (magically, somehow) converted to ${build.Password}.

Tests

_Please include tests. We recommend looking at existing tests as an example. _

I looked to create a new test, but it appears the main scenario is catered for by changing TestConfigUserNameOverride.
The other inverse behaviour is covered by TestConfigShouldBeAbleToOverrideDefaultedValues.

If your PR resolves any open issue(s), please indicate them like this so they will be closed when your PR is merged:

Closes #267

@matt-richardson
Copy link
Contributor Author

Hi @JenGoldstrich 👋
Any chance of getting this one merged & released? I'm blocked by this issue at the moment.

@JenGoldstrich JenGoldstrich changed the title Ensure build.password parameter gets set to generated password Ensure build.password parameter gets set to generated password for SSH Communicator Feb 24, 2023
@JenGoldstrich
Copy link
Contributor

Hey @matt-richardson I'm meeting with a team member this week to understand some context around why the SSH communicator might have been used this way before, and just to make sure this isn't going to break existing Linux users, I will get back to you after I chat with them.

@JenGoldstrich JenGoldstrich changed the title Ensure build.password parameter gets set to generated password for SSH Communicator Ensure build.password parameter gets set to generated password for SSH Communicator when no SSH password is set Mar 1, 2023
Copy link
Contributor

@JenGoldstrich JenGoldstrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be a breaking change for linux builds after chatting with @nywilken, so this looks good to me, thanks for your patience @matt-richardson!

@JenGoldstrich JenGoldstrich merged commit a95d663 into hashicorp:main Mar 1, 2023
@matt-richardson
Copy link
Contributor Author

Awesome - thanks @JenGoldstrich!

(don't want to come across as pushy, but) what's your plans around cutting a release? I'm keen to get it into play.

@matt-richardson matt-richardson deleted the mattr/ssh-password branch March 2, 2023 00:18
@JenGoldstrich
Copy link
Contributor

JenGoldstrich commented Mar 2, 2023

https://github.com/hashicorp/packer-plugin-azure/releases/tag/v1.4.1 🚀 yes of course, it's released now! Thanks for this contribution again!

@matt-richardson
Copy link
Contributor Author

Legend! Thanks!

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

Successfully merging this pull request may close these issues.

Build.Password is not set when using SSH on windows
2 participants