Skip to content
New issue

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

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

Already on GitHub? # to your account

Do not emit ssh public key removal logs when using ssh private key file #161

Closed
ralbertazzi opened this issue May 5, 2023 · 0 comments · Fixed by #162
Closed

Do not emit ssh public key removal logs when using ssh private key file #161

ralbertazzi opened this issue May 5, 2023 · 0 comments · Fixed by #162

Comments

@ralbertazzi
Copy link

ralbertazzi commented May 5, 2023

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

I'm using this Packer plugin with OS Login and a user-specified private key file. The plugin logs correctly report that an SSH key has been imported, but they mistakenly report at the end of the build that the key has been deleted. These logs confused me and, while I believe that no key has been deleted (I can in fact still see the key through gcloud compute os-login describe-profile and I successfully managed to launch multiple consecutive builds with the same key), I would like for the logs not to be emitted at all to avoid confusion.

Interesting configuration

ssh_private_key_file = "/path/to/private/key"
ssh_username = "sa-username"
use_os_login = true

When this configuration is used, these logs should not be emitted:

2023-05-05T16:25:04Z: ==> googlecompute.cos_image: Deleting SSH public key for OSLogin...
2023-05-05T16:25:04Z:     googlecompute.cos_image: SSH public key for OSLogin has been deleted!
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant