aws_recon 0.5.19 → 0.5.20

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: 4ad9424a430c12245df3339fbc2356755911e011b3535e64023ea407dfac9e5b
4
- data.tar.gz: df268326477fe481c0e81bd40cb28322a00fd3e21f9151334ef93e93c6e1bf33
3
+ metadata.gz: 2035a8262fecb131f3f0726f3865ea501653883b0dde2dbd23b4d3af1bdd823d
4
+ data.tar.gz: 25cac714f41b1618f116b9c3797551e1890f973875cfeb50a9c1201a9e32683e
5
5
  SHA512:
6
- metadata.gz: c1a16352d62d9c48a19b7e30b4b263a94c9cece99e05abbebfc88eaac54384748b6626e4b35514153797bab09b5a967910602d8805a3bedfc93005811dd58cc7
7
- data.tar.gz: 89e8f6630f7486ea8f4aecfc50f19143fe5e0caa6d0e0de77d15f63b1a8bdbbb1b7ecb84810713eeb5ce3610976d11556bb40928914db9d68b9e260a22c04ae9
6
+ metadata.gz: 9b2ca23229fc2bf7b16fdab17661ba3af40445c6e15339a78c873f64b8cdedfb31d258b2b35802d15807cd0d8bb56c338d85f1e1192bdf0623b5a018d513102b
7
+ data.tar.gz: fbde3eeccae95217fda68a0c0e82778506dc67e51f684fb4b0540350da8452b57c1430658c57c39db3c1ae5531a5bbebc262d5dcafcedf9b6696b371226897e1
@@ -98,7 +98,10 @@ class EC2 < Mapper
98
98
  struct.type = 'vpc'
99
99
  struct.arn = "arn:aws:ec2:#{@region}:#{@account}:vpc/#{vpc.vpc_id}" # no true ARN
100
100
  struct.flow_logs = @client
101
- .describe_flow_logs({ filter: [{ name: 'resource-id', values: [vpc.vpc_id] }] })
101
+ .describe_flow_logs({ filter: [{
102
+ name: 'resource-id',
103
+ values: [vpc.vpc_id]
104
+ }] })
102
105
  .flow_logs.first.to_h
103
106
 
104
107
  resources.push(struct.to_h)
@@ -337,19 +340,33 @@ class EC2 < Mapper
337
340
  #
338
341
  # describe_managed_prefix_lists
339
342
  #
340
- @client.describe_managed_prefix_lists.each_with_index do |response, page|
341
- log(response.context.operation_name, page)
343
+ begin
344
+ @client.describe_managed_prefix_lists.each_with_index do |response, page|
345
+ log(response.context.operation_name, page)
342
346
 
343
- response.prefix_lists.each do |list|
344
- struct = OpenStruct.new(list.to_h)
345
- struct.type = 'prefix_list'
346
- struct.arn = list.prefix_list_arn
347
+ response.prefix_lists.each do |list|
348
+ struct = OpenStruct.new(list.to_h)
349
+ struct.type = 'prefix_list'
350
+ struct.arn = list.prefix_list_arn
347
351
 
348
- resources.push(struct.to_h)
352
+ resources.push(struct.to_h)
353
+ end
349
354
  end
355
+ rescue Aws::EC2::Errors::ServiceError => e
356
+ log_error(e.code)
357
+
358
+ raise e unless suppressed_errors.include?(e.code) && !@options.quit_on_exception
350
359
  end
351
360
  end
352
361
 
353
362
  resources
354
363
  end
364
+
365
+ private
366
+
367
+ def suppressed_errors
368
+ %w[
369
+ InvalidAction
370
+ ]
371
+ end
355
372
  end
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.5.19"
2
+ VERSION = "0.5.20"
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.19
4
+ version: 0.5.20
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-09-27 00:00:00.000000000 Z
12
+ date: 2021-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk