sport_ngin_aws_auditor 4.3.0 → 4.3.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 272236aaef0f07666be8ffc21084d25f1a3dfebb0cd8e45c7561ac39cb29287c
|
4
|
+
data.tar.gz: bc5d6bc2324288813bed74beb87aba0bd1de7950282425efff7a42aab2b5c26d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5546d693f3454601d91584d63e76de0f9e9843bfc45c87976164c1ed27b5e6404c2700b56f93e6ca5bb0d6e126f0d2b773a3df080482eab0bac498e9c7358a0
|
7
|
+
data.tar.gz: b286a24a59db4dc48fe8a61c508ed4f759c0cead17d051b72d4bdf0f0c5a366b38e09e3b23405e36abd56ff8b30a8bc5a62e702838b878239e6c0c58c8483e68
|
data/CHANGELOG.markdown
CHANGED
@@ -1,18 +1 @@
|
|
1
|
-
#### v4.3.
|
2
|
-
* Compare platforms of RDS and EC2 instances correctly
|
3
|
-
|
4
|
-
> Emma Sax: Unknown User: https://github.com/sportngin/sport_ngin_aws_auditor/pull/43
|
5
|
-
|
6
|
-
* Have auditor check all regions, not just U.S. regions
|
7
|
-
|
8
|
-
> Emma Sax: Unknown User: https://github.com/sportngin/sport_ngin_aws_auditor/pull/42
|
9
|
-
|
10
|
-
#### v4.2.1
|
11
|
-
* Only give the name 'VPC' to an instance if the account supports EC2 Classic
|
12
|
-
|
13
|
-
> Emma Sax: Unknown User: https://github.com/sportngin/sport_ngin_aws_auditor/pull/40
|
14
|
-
|
15
|
-
#### v4.2.0
|
16
|
-
* Thread safe AWS SDK authentication
|
17
|
-
|
18
|
-
> Brian Bergstrom: https://github.com/sportngin/sport_ngin_aws_auditor/pull/37
|
1
|
+
#### v4.3.1
|
@@ -37,6 +37,7 @@ module SportNginAwsAuditor
|
|
37
37
|
self.engine = engine_helper(rds_instance.product_description)
|
38
38
|
self.count = rds_instance.db_instance_count
|
39
39
|
self.expiration_date = rds_instance.start_time + rds_instance.duration if rds_instance.state == 'retired'
|
40
|
+
arn = rds_instance.reserved_db_instance_id
|
40
41
|
elsif rds_instance.class.to_s == "Aws::RDS::Types::DBInstance"
|
41
42
|
self.id = rds_instance.db_instance_identifier
|
42
43
|
self.name = rds_instance.db_name
|
@@ -46,12 +47,9 @@ module SportNginAwsAuditor
|
|
46
47
|
self.instance_type = rds_instance.db_instance_class
|
47
48
|
self.engine = engine_helper(rds_instance.engine)
|
48
49
|
self.count = 1
|
50
|
+
arn = rds_instance.db_instance_arn
|
49
51
|
|
50
52
|
if tag_name
|
51
|
-
region = rds_instance.availability_zone.split(//).first(9).join
|
52
|
-
region = "us-east-1" if region == "Multiple"
|
53
|
-
arn = "arn:aws:rds:#{region}:#{account_id}:db:#{self.id}"
|
54
|
-
|
55
53
|
# go through to see if the tag we're looking for is one of them
|
56
54
|
client.list_tags_for_resource(resource_name: arn).tag_list.each do |tag|
|
57
55
|
if tag.key == tag_name
|
@@ -24,7 +24,8 @@ module SportNginAwsAuditor
|
|
24
24
|
engine: "mysql",
|
25
25
|
availability_zone: "us-east-1a",
|
26
26
|
class: "Aws::RDS::Types::DBInstance",
|
27
|
-
db_name: 'Example-instance-01'
|
27
|
+
db_name: 'Example-instance-01',
|
28
|
+
db_instance_arn: "arn_example")
|
28
29
|
rds_instance2 = double('rds_instance', db_instance_identifier: "our-service",
|
29
30
|
multi_az: false,
|
30
31
|
db_instance_class: "db.m3.large",
|
@@ -32,7 +33,8 @@ module SportNginAwsAuditor
|
|
32
33
|
engine: "mysql",
|
33
34
|
availability_zone: "us-east-1a",
|
34
35
|
class: "Aws::RDS::Types::DBInstance",
|
35
|
-
db_name: 'Example-instance-01'
|
36
|
+
db_name: 'Example-instance-01',
|
37
|
+
db_instance_arn: "arn_example")
|
36
38
|
db_instances = double('db_instances', db_instances: [rds_instance1, rds_instance2])
|
37
39
|
tag1 = double('tag', key: "cookie", value: "chocolate chip")
|
38
40
|
tag2 = double('tag', key: "ice cream", value: "oreo")
|
@@ -71,14 +73,16 @@ module SportNginAwsAuditor
|
|
71
73
|
state: "active",
|
72
74
|
product_description: "oracle-se2 (byol)",
|
73
75
|
db_instance_count: 1,
|
74
|
-
class: "Aws::RDS::Types::ReservedDBInstance"
|
76
|
+
class: "Aws::RDS::Types::ReservedDBInstance",
|
77
|
+
reserved_db_instance_id: "123")
|
75
78
|
reserved_rds_instance2 = double('reserved_rds_instance', reserved_db_instances_offering_id: "555te4yy-1234-555c-5678-thisisafake!!",
|
76
79
|
multi_az: false,
|
77
80
|
db_instance_class: "db.m3.large",
|
78
81
|
state: "active",
|
79
82
|
product_description: "postgresql",
|
80
83
|
db_instance_count: 2,
|
81
|
-
class: "Aws::RDS::Types::ReservedDBInstance"
|
84
|
+
class: "Aws::RDS::Types::ReservedDBInstance",
|
85
|
+
reserved_db_instance_id: "123")
|
82
86
|
reserved_db_instances = double('db_instances', reserved_db_instances: [reserved_rds_instance1, reserved_rds_instance2])
|
83
87
|
@rds_client = double('@rds_client', describe_reserved_db_instances: reserved_db_instances)
|
84
88
|
end
|
@@ -116,7 +120,9 @@ module SportNginAwsAuditor
|
|
116
120
|
db_instance_count: 1,
|
117
121
|
class: "Aws::RDS::Types::ReservedDBInstance",
|
118
122
|
start_time: @time - 31536000,
|
119
|
-
duration: 31536000
|
123
|
+
duration: 31536000,
|
124
|
+
reserved_db_instance_arn: "arn_example",
|
125
|
+
reserved_db_instance_id: "123")
|
120
126
|
retired_reserved_rds_instance2 = double('reserved_rds_instance', reserved_db_instances_offering_id: "555te4yy-1234-555c-5678-thisisafake!!",
|
121
127
|
multi_az: false,
|
122
128
|
db_instance_class: "db.m3.large",
|
@@ -125,7 +131,9 @@ module SportNginAwsAuditor
|
|
125
131
|
db_instance_count: 2,
|
126
132
|
class: "Aws::RDS::Types::ReservedDBInstance",
|
127
133
|
start_time: @time - 31536000,
|
128
|
-
duration: 31536000
|
134
|
+
duration: 31536000,
|
135
|
+
reserved_db_instance_arn: "arn_example",
|
136
|
+
reserved_db_instance_id: "123")
|
129
137
|
reserved_db_instances = double('db_instances', reserved_db_instances: [retired_reserved_rds_instance1,
|
130
138
|
retired_reserved_rds_instance2])
|
131
139
|
@rds_client = double('@rds_client', describe_reserved_db_instances: reserved_db_instances)
|
@@ -163,7 +171,8 @@ module SportNginAwsAuditor
|
|
163
171
|
state: "active",
|
164
172
|
product_description: "mysql",
|
165
173
|
db_instance_count: 3,
|
166
|
-
class: "Aws::RDS::Types::ReservedDBInstance"
|
174
|
+
class: "Aws::RDS::Types::ReservedDBInstance",
|
175
|
+
reserved_db_instance_id: "123")
|
167
176
|
reserved_db_instances = double('db_instances', reserved_db_instances: [reserved_rds_instance])
|
168
177
|
@rds_client = double('@rds_client', describe_reserved_db_instances: reserved_db_instances)
|
169
178
|
reserved_instances = RDSInstance.get_reserved_instances(@rds_client)
|
@@ -179,7 +188,8 @@ module SportNginAwsAuditor
|
|
179
188
|
engine: "postgres",
|
180
189
|
availability_zone: "us-east-1a",
|
181
190
|
class: "Aws::RDS::Types::DBInstance",
|
182
|
-
db_name: 'Example-instance-01'
|
191
|
+
db_name: 'Example-instance-01',
|
192
|
+
db_instance_arn: "arn_example")
|
183
193
|
db_instances = double('db_instances', db_instances: [rds_instance])
|
184
194
|
tag1 = double('tag', key: "cookie", value: "chocolate chip")
|
185
195
|
tag2 = double('tag', key: "ice cream", value: "oreo")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sport_ngin_aws_auditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Hursh
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-06-
|
13
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|
@@ -194,6 +194,20 @@ dependencies:
|
|
194
194
|
- - "~>"
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: 3.4.0
|
197
|
+
- !ruby/object:Gem::Dependency
|
198
|
+
name: byebug
|
199
|
+
requirement: !ruby/object:Gem::Requirement
|
200
|
+
requirements:
|
201
|
+
- - ">="
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '0'
|
204
|
+
type: :development
|
205
|
+
prerelease: false
|
206
|
+
version_requirements: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0'
|
197
211
|
description: Helps with AWS configuration
|
198
212
|
email:
|
199
213
|
- elliothursh@gmail.com
|