knife-ec2 2.0.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/chef/knife/ec2_server_create.rb +17 -11
- data/lib/knife-ec2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe1ebf8d54dad92978109ce3af6069df518ccd163583dadff486b7492f798cf1
|
|
4
|
+
data.tar.gz: d8f036bc63ee4d7b30bd3656ebda5a8f4f2425b7e12b004e6603b9b909a23ae7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e5185a70b989ab3594cf73011e8c01f3cafb3449e22c64bc31012ab38d37cad35e7142e9b5070b80ad761f0fb38a623b374e26d20a25ee4ce9ef40eca7981cd
|
|
7
|
+
data.tar.gz: a93a5c8a752e0745c7c30dd2f42d20c718b83e21192da44a50920ed363e139d48f0bd2b36e511a17c3e8f33c8e6b7940d5ace38ff1d0426fefce0cd7a9a4369b
|
|
@@ -104,9 +104,11 @@ class Chef
|
|
|
104
104
|
long: "--ebs-optimized",
|
|
105
105
|
description: "Enabled optimized EBS I/O"
|
|
106
106
|
|
|
107
|
-
option :
|
|
108
|
-
long: "--ebs-
|
|
109
|
-
description: "
|
|
107
|
+
option :ebs_delete_on_term,
|
|
108
|
+
long: "--ebs-delete-on-term",
|
|
109
|
+
description: "Delete EBS volume on instance termination",
|
|
110
|
+
boolean: true,
|
|
111
|
+
default: true
|
|
110
112
|
|
|
111
113
|
option :secret,
|
|
112
114
|
long: "--secret ",
|
|
@@ -624,12 +626,18 @@ class Chef
|
|
|
624
626
|
exit 1
|
|
625
627
|
end
|
|
626
628
|
|
|
627
|
-
if config[:ebs_volume_type] && ! %w{gp2 io1 standard}.include?(config[:ebs_volume_type])
|
|
628
|
-
ui.error("--ebs-volume-type must be 'standard' or 'io1' or 'gp2'")
|
|
629
|
+
if config[:ebs_volume_type] && ! %w{gp2 io1 standard st1 sc1}.include?(config[:ebs_volume_type])
|
|
630
|
+
ui.error("--ebs-volume-type must be 'standard' or 'io1' or 'gp2' or 'st1' or 'sc1'")
|
|
629
631
|
msg opt_parser
|
|
630
632
|
exit 1
|
|
631
633
|
end
|
|
632
634
|
|
|
635
|
+
# validation for ebs_size
|
|
636
|
+
if (%w{st1 sc1}.include?(config[:ebs_volume_type])) && ! config[:ebs_size].to_i.between?(500, 16384)
|
|
637
|
+
ui.error("--ebs-size should be in between 500-16384 for 'st1' or 'sc1' ebs volume type.")
|
|
638
|
+
exit 1
|
|
639
|
+
end
|
|
640
|
+
|
|
633
641
|
if config[:security_groups] && config[:security_groups].class == String
|
|
634
642
|
ui.error("Invalid value type for knife[:security_groups] in knife configuration file (i.e knife.rb/config.rb). Type should be array. e.g - knife[:security_groups] = ['sgroup1']")
|
|
635
643
|
exit 1
|
|
@@ -907,7 +915,7 @@ class Chef
|
|
|
907
915
|
attributes[:ebs_optimized] = !!config[:ebs_optimized]
|
|
908
916
|
|
|
909
917
|
if ami.root_device_type == "ebs"
|
|
910
|
-
if config[:ebs_encrypted]
|
|
918
|
+
if config[:ebs_encrypted] || %w{st1 sc1}.include?(config[:ebs_volume_type])
|
|
911
919
|
ami_map = ami.block_device_mappings[1]
|
|
912
920
|
else
|
|
913
921
|
ami_map = ami.block_device_mappings.first
|
|
@@ -924,11 +932,9 @@ class Chef
|
|
|
924
932
|
msg opt_parser
|
|
925
933
|
exit 1
|
|
926
934
|
end
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
ami_map.ebs.delete_on_termination if ami_map.ebs.respond_to?(:delete_on_termination)
|
|
931
|
-
end
|
|
935
|
+
|
|
936
|
+
delete_term = config[:ebs_delete_on_term]
|
|
937
|
+
|
|
932
938
|
iops_rate = begin
|
|
933
939
|
if config[:ebs_provisioned_iops]
|
|
934
940
|
Integer(config[:ebs_provisioned_iops]).to_s
|
data/lib/knife-ec2/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knife-ec2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chef Software, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-10-
|
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chef
|