knife-ec2 1.0.1 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e04afd6e4a0620bf4674a380606b26cb788fc4148ba1c5b3d6bd0f5b961a95f7
4
- data.tar.gz: 5d9a506ba3e9c639e9ba356af39377c498146e3904f870a07018b7eacc1d5f0e
3
+ metadata.gz: 37c08a54649fd441e8a497e268d512da71aa52c1b868196cd672297cb3535685
4
+ data.tar.gz: 92b071136caf3bd82c6c47ed4970a815a6e3590de358d737234c3d7067cadbf2
5
5
  SHA512:
6
- metadata.gz: 9dab9ba5f3d204aab6d65534b3eb4e3a018007fa8917c44de439cc04a4bf8f745b6f9a14a96e2fcd4e811a6cc1f34df5eb50bfae825674886348cbbfaa738212
7
- data.tar.gz: 9486a1aa93798a9aae585fc18e9888c93875a653a2d99bc2110ccd483446266daf16526960be44ad5acd53296ef9a931abc87b37c5af459097a6fdee70af85ec
6
+ metadata.gz: 493bae78b6be752198bff0d1b6f9a6001f1f9be4fbfecf67d04e05a54351f9fdeadae50fa17db0e941cce63a0737d52897b912c793b9a2cacedeba0386238fbc
7
+ data.tar.gz: 6dbdbfc483c9a7b870d0c472de48ad460913f3e90eedbedb30a04f4f14998d9eb8a308ab102cc666f2849ff7ff2f209fe4c7f86469a7a4fd0d8bf8322ba04c4a
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Piyush Awasthi (<piyush.awasthi@msystechnologies.com>)
3
- # Copyright:: Copyright (c) 2017-2018 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2017-2019 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Seth Chisamore (<schisamo@chef.io>)
3
- # Copyright:: Copyright (c) 2011-2018 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2011-2019 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -80,10 +80,13 @@ class Chef
80
80
  def connection_string
81
81
  conn = {}
82
82
  conn[:region] = locate_config_value(:region)
83
+ Chef::Log.debug "Using AWS region #{locate_config_value(:region)}"
83
84
  conn[:credentials] =
84
85
  if locate_config_value(:use_iam_profile)
86
+ Chef::Log.debug "Using iam profile for authentication as use_iam_profile set"
85
87
  Aws::InstanceProfileCredentials.new
86
88
  else
89
+ Chef::Log.debug "Setting up AWS connection using aws_access_key_id #{locate_config_value(:aws_access_key_id)} aws_secret_access_key: #{locate_config_value(:aws_secret_access_key)} aws_session_token: #{locate_config_value(:aws_session_token)}"
87
90
  Aws::Credentials.new(locate_config_value(:aws_access_key_id), locate_config_value(:aws_secret_access_key), locate_config_value(:aws_session_token))
88
91
  end
89
92
  conn
@@ -308,6 +311,8 @@ class Chef
308
311
  # @return [void]
309
312
  def validate_aws_config_file!
310
313
  config_file = locate_config_value(:aws_config_file)
314
+ Chef::Log.debug "Using AWS config file at #{config_file}"
315
+
311
316
  raise ArgumentError, "The provided --aws_config_file (#{config_file}) cannot be found on disk." unless File.exist?(config_file)
312
317
 
313
318
  aws_config = ini_parse(File.read(config_file))
@@ -326,6 +331,7 @@ class Chef
326
331
  # validate the contents of the aws credentials file
327
332
  # @return [void]
328
333
  def validate_aws_credential_file!
334
+ Chef::Log.debug "Using AWS credential file at #{aws_cred_file_location}"
329
335
  raise ArgumentError, "The provided --aws_credential_file (#{aws_cred_file_location}) cannot be found on disk." unless File.exist?(aws_cred_file_location)
330
336
 
331
337
  # File format:
@@ -339,6 +345,8 @@ class Chef
339
345
  aws_creds = ini_parse(File.read(aws_cred_file_location))
340
346
  profile = locate_config_value(:aws_profile)
341
347
 
348
+ Chef::Log.debug "Using AWS profile #{profile}"
349
+
342
350
  entries = if aws_creds.values.first.key?("AWSAccessKeyId")
343
351
  aws_creds.values.first
344
352
  else
@@ -350,7 +358,7 @@ class Chef
350
358
  Chef::Config[:knife][:aws_secret_access_key] = entries["AWSSecretKey"] || entries["aws_secret_access_key"]
351
359
  Chef::Config[:knife][:aws_session_token] = entries["AWSSessionToken"] || entries["aws_session_token"]
352
360
  else
353
- raise ArgumentError, "The provided --aws-profile '#{profile}' is invalid."
361
+ raise ArgumentError, "The provided --aws-profile '#{profile}' is invalid. Does the credential file at '#{aws_cred_file_location}' contain this profile?"
354
362
  end
355
363
  end
356
364
  end
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Tim Smith (<tsmith@chef.io>)
3
- # Copyright:: Copyright (c) 2018 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2018-2019 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Seth Chisamore (<schisamo@chef.io>)
3
- # Copyright:: Copyright (c) 2012-2018 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2012-2019 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Tim Smith (<tsmith@chef.io>)
3
- # Copyright:: Copyright (c) 2018 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2018-2019 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # Author:: Adam Jacob (<adam@chef.io>)
3
3
  # Author:: Seth Chisamore (<schisamo@chef.io>)
4
- # Copyright:: Copyright (c) 2010-2018 Chef Software, Inc.
4
+ # Copyright:: Copyright (c) 2010-2019 Chef Software, Inc.
5
5
  # License:: Apache License, Version 2.0
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # Author:: Adam Jacob (<adam@chef.io>)
3
3
  # Author:: Seth Chisamore (<schisamo@chef.io>)
4
- # Copyright:: Copyright (c) 2009-2018 Chef Software, Inc.
4
+ # Copyright:: Copyright (c) 2009-2019 Chef Software, Inc.
5
5
  # License:: Apache License, Version 2.0
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # Author:: Adam Jacob (<adam@chef.io>)
3
3
  # Author:: Seth Chisamore (<schisamo@chef.io>)
4
- # Copyright:: Copyright (c) 2010-2018 Chef Software, Inc.
4
+ # Copyright:: Copyright (c) 2010-2019 Chef Software, Inc.
5
5
  # License:: Apache License, Version 2.0
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Tim Smith (<tsmith@chef.io>)
3
- # Copyright:: Copyright (c) 2018 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2018-2019 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Tim Smith (<tsmith@chef.io>)
3
- # Copyright:: Copyright (c) 2018 Chef Software, Inc.
3
+ # Copyright:: Copyright (c) 2018-2019 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Ec2
3
- VERSION = "1.0.1".freeze
3
+ VERSION = "1.0.7".freeze
4
4
  MAJOR, MINOR, TINY = VERSION.split(".")
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.