aws_recon 0.5.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b98e94e11398d8f2aec76174c8d660be040521e44439ca70ca7b5b680e6a631
4
- data.tar.gz: e8920ba7308df8491ae6ce6271188fedf3e57e499bc51f6d9d772728277ef6a6
3
+ metadata.gz: 02f62713767ee1d437543e7684f844a1a9a922179bf6be3688ef7ccb114de345
4
+ data.tar.gz: d71ef31099b1fbee477b482a9aa84bfe6c9e091aacf2772678cbdf3b9dbfb7ca
5
5
  SHA512:
6
- metadata.gz: b4c38506bd2a3f6a84d1bbe430f9812e5989bf80d6e8198bfee55ebb1b7f6b8010ee998b896e4202443224046a5fd33c1ed1913fa43d59a25d2cfdf4028d94cc
7
- data.tar.gz: a91bd12229dead116b77d412043ecfcef306af8a2ac80772e2c6596574c488cd9e9c97e662334d76a97acb50b95bc578c51ccfcd5dbb3c7b53145e832eea9989
6
+ metadata.gz: 9215bf848adbd54d2652b35429897ac23e5f7140d6c7aa79db941622c95dee3468bd0354aedcdb3378086592740ea496b435a32adc138ce491a999b56ea4fc59
7
+ data.tar.gz: f151740b1e793abcae34a948f6375f8ff3a496d52a4df596cd115f59260b0afbbc1710400646c77eece2220fe399aef6ef5f181d2ad5a6cf326ebf51b4ea75d9
@@ -29,7 +29,7 @@ class EC2 < Mapper
29
29
  struct = OpenStruct.new
30
30
  struct.attributes = response.account_attributes.map(&:to_h)
31
31
  struct.type = 'account'
32
- struct.arn = "arn:aws:ec2::#{@account}/account_attributes"
32
+ struct.arn = "arn:aws:ec2::#{@account}:attributes/account_attributes"
33
33
 
34
34
  resources.push(struct.to_h)
35
35
  end
@@ -45,7 +45,7 @@ class EC2 < Mapper
45
45
 
46
46
  struct = OpenStruct.new(response.to_h)
47
47
  struct.type = 'ebs_encryption_settings'
48
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/ebs_encryption_settings"
48
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:settings/ebs_encryption_settings"
49
49
 
50
50
  resources.push(struct.to_h)
51
51
  end
@@ -64,7 +64,7 @@ class EC2 < Mapper
64
64
  reservation.instances.each do |instance|
65
65
  struct = OpenStruct.new(instance.to_h)
66
66
  struct.type = 'instance'
67
- struct.arn = instance.instance_id # no true ARN
67
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:instance/#{instance.instance_id}" # no true ARN
68
68
  struct.reservation_id = reservation.reservation_id
69
69
 
70
70
  # collect instance user_data
@@ -96,7 +96,7 @@ class EC2 < Mapper
96
96
  response.vpcs.each do |vpc|
97
97
  struct = OpenStruct.new(vpc.to_h)
98
98
  struct.type = 'vpc'
99
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{vpc.vpc_id}" # no true ARN
99
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:vpc/#{vpc.vpc_id}" # no true ARN
100
100
  struct.flow_logs = @client
101
101
  .describe_flow_logs({ filter: [{ name: 'resource-id', values: [vpc.vpc_id] }] })
102
102
  .flow_logs.first.to_h
@@ -114,7 +114,7 @@ class EC2 < Mapper
114
114
  response.security_groups.each do |security_group|
115
115
  struct = OpenStruct.new(security_group.to_h)
116
116
  struct.type = 'security_group'
117
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{security_group.group_id}" # no true ARN
117
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:security_group/#{security_group.group_id}" # no true ARN
118
118
 
119
119
  resources.push(struct.to_h)
120
120
  end
@@ -129,7 +129,7 @@ class EC2 < Mapper
129
129
  response.network_interfaces.each do |network_interface|
130
130
  struct = OpenStruct.new(network_interface.to_h)
131
131
  struct.type = 'network_interface'
132
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{network_interface.network_interface_id}" # no true ARN
132
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:network_interface/#{network_interface.network_interface_id}" # no true ARN
133
133
 
134
134
  resources.push(struct.to_h)
135
135
  end
@@ -144,7 +144,7 @@ class EC2 < Mapper
144
144
  response.network_acls.each do |network_acl|
145
145
  struct = OpenStruct.new(network_acl.to_h)
146
146
  struct.type = 'network_acl'
147
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{network_acl.network_acl_id}" # no true ARN
147
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:network_acl/#{network_acl.network_acl_id}" # no true ARN
148
148
 
149
149
  resources.push(struct.to_h)
150
150
  end
@@ -159,7 +159,7 @@ class EC2 < Mapper
159
159
  response.subnets.each do |subnet|
160
160
  struct = OpenStruct.new(subnet.to_h)
161
161
  struct.type = 'subnet'
162
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{subnet.subnet_arn}" # no true ARN
162
+ struct.arn = subnet.subnet_arn
163
163
 
164
164
  resources.push(struct.to_h)
165
165
  end
@@ -174,7 +174,7 @@ class EC2 < Mapper
174
174
  response.addresses.each do |address|
175
175
  struct = OpenStruct.new(address.to_h)
176
176
  struct.type = 'eip_address'
177
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{address.allocation_id}" # no true ARN
177
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:eip_address/#{address.allocation_id}" # no true ARN
178
178
 
179
179
  resources.push(struct.to_h)
180
180
  end
@@ -189,7 +189,7 @@ class EC2 < Mapper
189
189
  response.nat_gateways.each do |gateway|
190
190
  struct = OpenStruct.new(gateway.to_h)
191
191
  struct.type = 'nat_gateway'
192
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{gateway.nat_gateway_id}" # no true ARN
192
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:nat_gateway/#{gateway.nat_gateway_id}" # no true ARN
193
193
 
194
194
  resources.push(struct.to_h)
195
195
  end
@@ -204,7 +204,7 @@ class EC2 < Mapper
204
204
  response.internet_gateways.each do |gateway|
205
205
  struct = OpenStruct.new(gateway.to_h)
206
206
  struct.type = 'internet_gateway'
207
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{gateway.internet_gateway_id}" # no true ARN
207
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:internet_gateway/#{gateway.internet_gateway_id}" # no true ARN
208
208
 
209
209
  resources.push(struct.to_h)
210
210
  end
@@ -219,7 +219,7 @@ class EC2 < Mapper
219
219
  response.route_tables.each do |table|
220
220
  struct = OpenStruct.new(table.to_h)
221
221
  struct.type = 'route_table'
222
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{table.route_table_id}" # no true ARN
222
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:route_table/#{table.route_table_id}" # no true ARN
223
223
 
224
224
  resources.push(struct.to_h)
225
225
  end
@@ -234,7 +234,7 @@ class EC2 < Mapper
234
234
  response.images.each do |image|
235
235
  struct = OpenStruct.new(image.to_h)
236
236
  struct.type = 'image'
237
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{image.image_id}" # no true ARN
237
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:image/#{image.image_id}" # no true ARN
238
238
 
239
239
  resources.push(struct.to_h)
240
240
  end
@@ -249,7 +249,7 @@ class EC2 < Mapper
249
249
  response.snapshots.each do |snapshot|
250
250
  struct = OpenStruct.new(snapshot.to_h)
251
251
  struct.type = 'snapshot'
252
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{snapshot.snapshot_id}" # no true ARN
252
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:snapshot/#{snapshot.snapshot_id}" # no true ARN
253
253
  struct.create_volume_permissions = @client.describe_snapshot_attribute({
254
254
  attribute: 'createVolumePermission',
255
255
  snapshot_id: snapshot.snapshot_id
@@ -268,7 +268,7 @@ class EC2 < Mapper
268
268
  response.flow_logs.each do |flow_log|
269
269
  struct = OpenStruct.new(flow_log.to_h)
270
270
  struct.type = 'flow_log'
271
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{flow_log.flow_log_id}" # no true ARN
271
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:flow_log/#{flow_log.flow_log_id}" # no true ARN
272
272
 
273
273
  resources.push(struct.to_h)
274
274
  end
@@ -283,7 +283,7 @@ class EC2 < Mapper
283
283
  response.volumes.each do |volume|
284
284
  struct = OpenStruct.new(volume.to_h)
285
285
  struct.type = 'volume'
286
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{volume.volume_id}" # no true ARN
286
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:volume/#{volume.volume_id}" # no true ARN
287
287
 
288
288
  resources.push(struct.to_h)
289
289
  end
@@ -298,7 +298,7 @@ class EC2 < Mapper
298
298
  response.vpn_gateways.each do |gateway|
299
299
  struct = OpenStruct.new(gateway.to_h)
300
300
  struct.type = 'vpn_gateway'
301
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{gateway.vpn_gateway_id}" # no true ARN
301
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:vpn_gateway/#{gateway.vpn_gateway_id}" # no true ARN
302
302
 
303
303
  resources.push(struct.to_h)
304
304
  end
@@ -313,7 +313,7 @@ class EC2 < Mapper
313
313
  response.vpc_peering_connections.each do |peer|
314
314
  struct = OpenStruct.new(peer.to_h)
315
315
  struct.type = 'peering_connection'
316
- struct.arn = "arn:aws:ec2:#{@region}:#{@account}/#{peer.vpc_peering_connection_id}" # no true ARN
316
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:peering_connection/#{peer.vpc_peering_connection_id}" # no true ARN
317
317
 
318
318
  resources.push(struct.to_h)
319
319
  end
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_recon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Larsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-06 00:00:00.000000000 Z
12
+ date: 2021-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk