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

Support AWS session tokens for use with IAM roles. #34

Merged
merged 1 commit into from
Jan 24, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/kitchen/driver/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class Ec2 < Kitchen::Driver::SSHBase
default_config :aws_secret_access_key do |driver|
ENV['AWS_SECRET_KEY'] || ENV['AWS_SECRET_ACCESS_KEY']
end
default_config :aws_session_token do |driver|
ENV['AWS_SESSION_TOKEN'] || ENV['AWS_TOKEN']
end
default_config :aws_ssh_key_id do |driver|
ENV['AWS_SSH_KEY_ID']
end
Expand Down Expand Up @@ -102,6 +105,7 @@ def connection
:provider => :aws,
:aws_access_key_id => config[:aws_access_key_id],
:aws_secret_access_key => config[:aws_secret_access_key],
:aws_session_token => config[:aws_session_token],
:region => config[:region],
:endpoint => config[:endpoint],
)
Expand Down