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 +4 -4
- data/lib/chef/knife/ec2_ami_list.rb +1 -1
- data/lib/chef/knife/ec2_base.rb +10 -2
- data/lib/chef/knife/ec2_eip_list.rb +1 -1
- data/lib/chef/knife/ec2_flavor_list.rb +1 -1
- data/lib/chef/knife/ec2_securitygroup_list.rb +1 -1
- data/lib/chef/knife/ec2_server_create.rb +1 -1
- data/lib/chef/knife/ec2_server_delete.rb +1 -1
- data/lib/chef/knife/ec2_server_list.rb +1 -1
- data/lib/chef/knife/ec2_subnet_list.rb +1 -1
- data/lib/chef/knife/ec2_vpc_list.rb +1 -1
- data/lib/knife-ec2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c08a54649fd441e8a497e268d512da71aa52c1b868196cd672297cb3535685
|
4
|
+
data.tar.gz: 92b071136caf3bd82c6c47ed4970a815a6e3590de358d737234c3d7067cadbf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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-
|
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");
|
data/lib/chef/knife/ec2_base.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Seth Chisamore (<schisamo@chef.io>)
|
3
|
-
# Copyright:: Copyright (c) 2011-
|
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-
|
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-
|
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-
|
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-
|
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");
|
data/lib/knife-ec2/version.rb
CHANGED