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

RFE: Cleanup orphan EC2 ssh key pairs #378

Open
cevich opened this issue Aug 15, 2024 · 0 comments
Open

RFE: Cleanup orphan EC2 ssh key pairs #378

cevich opened this issue Aug 15, 2024 · 0 comments

Comments

@cevich
Copy link
Member

cevich commented Aug 15, 2024

When creating images in AWS EC2, packer creates a key-pair (object) to access it. However, if a image-build PR is forced-pushed or build task canceled/aborted packer can't remove it. A new periodic (or add to existing) job should be created to remove old key-pairs from EC2. They're always named packer_<some UUID>.

The danger here is hitting some restriction on the EC2-side for the maximum number of key-pairs. It's also a minor pain to remember to manually clean these things up every now and again (I just removed 22 of them going as far back as December 2023 😢

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

No branches or pull requests

1 participant