ami_spec 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/ami_spec/aws_instance.rb +2 -1
- data/lib/ami_spec/aws_instance_options.rb +1 -0
- data/lib/ami_spec/version.rb +1 -1
- data/lib/ami_spec.rb +5 -2
- 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: a2a7a5034e02deb64f10fae91426c5771688bbae9c8e56764c6af2faa13ebe7c
|
4
|
+
data.tar.gz: b006c1eeeae2d04e63d077717fabf1aa0ebe29a8361f88c6958d92401866ff7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9e66fea702fe7f9edf9aa8679ec2c386e1c46079c9371b5cbae2964b25b9d84eb60ed65a54b34e54d123ab27e7bc2756dd4c9ee2fefffdd751187802d74976a
|
7
|
+
data.tar.gz: 1aaf85899a5269204bc817680c83c386e1b8132727712c49145cfa52627b72ea7301c8be6d08b28ae143daab2aa67aa0a61ec07854fb6b4a896c230b5843ccde
|
data/README.md
CHANGED
@@ -54,7 +54,8 @@ Options:
|
|
54
54
|
group will be generated in AWS
|
55
55
|
-n, --allow-any-temporary-security-group The temporary security group will allow SSH connections
|
56
56
|
from any IP address (0.0.0.0/0), otherwise allow the subnet's block
|
57
|
-
-p, --aws-public-ip Launch instances with a public IP
|
57
|
+
-p, --aws-public-ip Launch instances with a public IP and use that IP for SSH
|
58
|
+
-q, --associate-public-ip Launch instances with a public IP and use the Private IP for SSH
|
58
59
|
-t, --ssh-retries=<i> The number of times we should try sshing to the ec2 instance
|
59
60
|
before giving up. Defaults to 30 (default: 30)
|
60
61
|
-g, --tags=<s> Additional tags to add to launched instances in the form of
|
@@ -19,6 +19,7 @@ module AmiSpec
|
|
19
19
|
@key_name = options.fetch(:key_name)
|
20
20
|
@instance_type = options.fetch(:aws_instance_type)
|
21
21
|
@public_ip = options.fetch(:aws_public_ip)
|
22
|
+
@associate_public_ip = options.fetch(:associate_public_ip)
|
22
23
|
@region = options.fetch(:aws_region)
|
23
24
|
@security_group_ids = options.fetch(:aws_security_groups)
|
24
25
|
@tags = ec2ify_tags(options.fetch(:tags))
|
@@ -61,7 +62,7 @@ module AmiSpec
|
|
61
62
|
key_name: @key_name,
|
62
63
|
network_interfaces: [{
|
63
64
|
device_index: 0,
|
64
|
-
associate_public_ip_address: @public_ip,
|
65
|
+
associate_public_ip_address: @public_ip || @associate_public_ip,
|
65
66
|
subnet_id: @subnet_id,
|
66
67
|
}]
|
67
68
|
}
|
data/lib/ami_spec/version.rb
CHANGED
data/lib/ami_spec.rb
CHANGED
@@ -38,7 +38,9 @@ module AmiSpec
|
|
38
38
|
# aws_instance_type::
|
39
39
|
# AWS ec2 instance type
|
40
40
|
# aws_public_ip::
|
41
|
-
# Should the instances get a public IP address
|
41
|
+
# Should the instances get a public IP address and use that IP for SSH
|
42
|
+
# associate_public_ip::
|
43
|
+
# Launch instances with a public IP but don't use that IP for SSH
|
42
44
|
# ssh_user::
|
43
45
|
# The username to SSH to the AMI with.
|
44
46
|
# ssh_retries::
|
@@ -147,7 +149,8 @@ web_server,ami-id.',
|
|
147
149
|
type: :string, default: nil, multi: true, short: :c
|
148
150
|
opt :allow_any_temporary_security_group, 'The temporary security group will allow SSH connections from any IP address (0.0.0.0/0)',
|
149
151
|
short: :n
|
150
|
-
opt :aws_public_ip, 'Launch instances with a public IP', short: :p
|
152
|
+
opt :aws_public_ip, 'Launch instances with a public IP and use that IP for SSH', short: :p
|
153
|
+
opt :associate_public_ip, "Launch instances with a public IP but don't use that IP for SSH", short: :q
|
151
154
|
opt :ssh_retries, 'The number of times we should try sshing to the ec2 instance before giving up. Defaults to 30',
|
152
155
|
type: :int, default: 30, short: :t
|
153
156
|
opt :tags, 'Additional tags to add to launched instances in the form of comma separated key=value pairs. i.e. Name=AmiSpec',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ami_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Robinson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-11-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-ec2
|