hetznercloud / packer-plugin-hcloud

Packer plugin for Hetzner Cloud Builder
https://developer.hashicorp.com/packer/integrations/hetznercloud/hcloud
Mozilla Public License 2.0
22 stars 21 forks source link

Use SDK communicator to generate SSH key pair #39

Closed Feder1co5oave closed 2 years ago

Feder1co5oave commented 2 years ago

I've added a communicator.StepSSHKeyGen to let the communicator pre-generate the SSH key pair, used that key and removed the code that creates a new RSA SSH key pair in stepCreateSSHKey.

This means the plugin now supports temporary_key_pair_type and temporary_key_pair_bits.

I used https://github.com/hashicorp/packer-plugin-digitalocean/commit/e88d4df09e8085fe4ed76fc219762f3e7970186b as a baseline.

I've run the acceptance test and it completes successfully, after adding the required ssh_username. I don't think this needs any change to the docs.

hashicorp-cla commented 2 years ago

CLA assistant check
All committers have signed the CLA.

Feder1co5oave commented 2 years ago

I signed the CLA and am awaiting feedback on this PR

nywilken commented 2 years ago

The missing documentation partial was added a follow to this change. Thanks for the contribution.

Feder1co5oave commented 2 years ago

Cheers! I think this fixes #43