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

Explicitly support usage w/o manual or autoconfiguration of aws_ssh_key_id #391

Closed
ghost opened this issue Mar 12, 2018 · 6 comments
Closed
Assignees

Comments

@ghost
Copy link

ghost commented Mar 12, 2018

I recently updated to the latest ChefDK which is 2.5.3. They bundle a newer version of the kitchen-ec2 gem which appears to break backward compatible functionality. The issue at hand is that I work in an environment where the AWS SSH managed keys are disallowed. In fact, my colleague at the time submitted a patch against kitchen-ec2 to not require this attribute be set: #269.

Would it be possible to have a flag that disabled the creation of the key automagically to restore the previous functionality .... ?

@ghost
Copy link
Author

ghost commented Mar 12, 2018

#268

@cheeseplus
Copy link
Contributor

cheeseplus commented Mar 12, 2018

I'm not sure what the problem is based on the description - we still use a key if told to, the auto-gen only should be happening when no key or security group is provided. Please provide the relevant logs and kitchen.yml so we can figure out what exactly is going on here.

@ghost
Copy link
Author

ghost commented Mar 12, 2018

Hey @cheeseplus, my apologies ... I could have been a little clearer ....

My current use case is the following:
My company disallows the use of AWS SSH managed key pairs. Currently with kitchen-ec2 driver, we have been provisioning the public part of the SSH key in the user_data and in the transport have been specifying the private part of the key.

Gem Timeline:
#268 & #269 was to address this and as a result, aws_ssh_key_id became an optional attribute.

With the change to create the key after version >= 2.1.0, if you do not specify aws_ssh_key_id it attempts to create one for you. This breaks us because with #268 & #269, the aws_ssh_key_id attribute was made optional without the key being created for you.

Hopefully this makes sense.

@cheeseplus
Copy link
Contributor

I spent some time digging through the options and this definitely makes sense now that I have the context 👍 . We probably need to allow for that that to be explicitly false such that we can continue to accommodate that usage.

@ghost
Copy link
Author

ghost commented Mar 12, 2018

@cheeseplus 👍

@cheeseplus cheeseplus self-assigned this Mar 14, 2018
@cheeseplus cheeseplus changed the title autogeneration of AWS SSH Key if one not specified Explicitly support usage w/o manual or autoconfiguration of aws_ssh_key_id Mar 14, 2018
@cheeseplus
Copy link
Contributor

cheeseplus commented Mar 14, 2018

I'm not sure we need any extra code, can you try setting aws_ssh_key_id: false? ignore me

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

No branches or pull requests

2 participants