Skip to content

Commit

Permalink
add VPC flow logs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlarsen committed Aug 6, 2020
1 parent 799b813 commit 8d25f07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions collectors/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def collect
struct = OpenStruct.new(vpc.to_h)
struct.type = 'vpc'
struct.arn = vpc.vpc_id # no true ARN
struct.flow_logs = @client
.describe_flow_logs({ filter: [{ name: 'resource-id', values: [vpc.vpc_id] }] })
.flow_logs.first.to_h

resources.push(struct.to_h)
end
Expand Down

0 comments on commit 8d25f07

Please sign in to comment.