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

Can't use PrivateKeyFile on AWS without providing a KeyPairName (take 2) #2301

Closed
ColinHebert opened this issue Jun 24, 2015 · 12 comments · Fixed by #3953
Closed

Can't use PrivateKeyFile on AWS without providing a KeyPairName (take 2) #2301

ColinHebert opened this issue Jun 24, 2015 · 12 comments · Fixed by #3953

Comments

@ColinHebert
Copy link
Contributor

ColinHebert commented Jun 24, 2015

Follow up to #2281

It seems that it is still not possible to use aws without providing a keypair name:

1435111252,,ui,error,Build 'My CustomBuild' errored: Error launching source instance: InvalidKeyPair.NotFound: The key pair '' does not exist\n status code: 400%!(PACKER_COMMA) request id: []

EDIT: a issue doesn't close another issue.
Closes #2754

@catsby
Copy link
Contributor

catsby commented Jun 24, 2015

Hey @ColinHebert – can you give me an example of how you're specifying keys in the configuration? You're specifying both ssh_keypair_name and ssh_private_key_file, and your source AMI already has the key in place, correct?

@ColinHebert
Copy link
Contributor Author

I'm only specifying the ssh_private_key_file, and not the ssh_keypair_name the key has already been set up on our base AMI, so it shouldn't be needed.

@ruizink
Copy link

ruizink commented Jun 29, 2015

Yep, I have the exact same problem.
My pub key is already deployed, so neither ssh_keypair_name nor temporary_key_pair_name should be needed, since we are providing a ssh_private_key_file.

@kintoandar
Copy link

Same issue here, only using ssh_private_key_file as the AMI already has my public ssh key.

@ColinHebert
Copy link
Contributor Author

Any news on this issue?

@MartinSGill
Copy link

Running into this issue as well. Anyone have a workaround, or know which release broke this, so I can downgrade to work around it please?

@cbednarski cbednarski added the +1 label Aug 12, 2015
@ColinHebert
Copy link
Contributor Author

@catsby @cbednarski Any news?

@ojongerius
Copy link

@catsby / @cbednarski is this waiting on something? Can we help to get this sorted?

@jkilada
Copy link

jkilada commented May 27, 2016

@catsby / @cbednarski Any word on this? Is there still no way to use an existing private key file without using a key pair name?

@brannn
Copy link

brannn commented Jun 21, 2016

Will this be fixed?

@oddtazz
Copy link

oddtazz commented Sep 30, 2016

A fix for this issue would be nice.
Had to pin packer to version 0.7.5 internally because of this bug.

@rickard-von-essen rickard-von-essen self-assigned this Sep 30, 2016
rickard-von-essen added a commit to rickard-von-essen/packer that referenced this issue Oct 2, 2016
This adds support for using amazon-ebs/amazon-instance builder without
a keypair. If a ssh_private_key_file is supplied without a
ssh_keypair_name no temporary ssh keypair is created. If ssh_password is
used no temporary ssh keypair is created and the password is used when
trying to connect.

Closes hashicorp#2301
Closes hashicorp#3156
@rickard-von-essen
Copy link
Collaborator

Please test if PR #3953 solves your issue.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.