chef-boneyard / chef-provisioning-aws

AWS driver and resources for Chef that uses the AWS SDK
Apache License 2.0
142 stars 121 forks source link

Prioritize usage of key_data of user provisioning config over all private key settings #504

Closed baurzhan-konurbayev closed 8 years ago

baurzhan-konurbayev commented 8 years ago

Sometimes user might not have a private key of instance's key pair, but one does have SSH access and private key of root or any other legit user. So, in this case it would be handy to fill :key_data of :ssh_options iin user config and work this way.

The problem arises when you don't have a key pair. If you try to converge you will get a message like:

Server has key name '#{instance.key_name}', but the corresponding private key was not found locally

This pull request was inspired by chef-provisioning-fog, since it works exactly like in PR.

Thanks.

tyler-ball commented 8 years ago

Thanks for the PR! I added some test coverage and merged