lib/fog/bouncer/security.rb in fog-bouncer-0.2.5 vs lib/fog/bouncer/security.rb in fog-bouncer-0.2.6
- old
+ new
@@ -35,13 +35,16 @@
@groups ||= []
end
def import_remote_groups
Fog::Bouncer.fog.security_groups.each do |remote_group|
+ next if remote_group.vpc_id
next if @specific_groups.any? && !@specific_groups.include?(remote_group.name)
group = group(remote_group.name, remote_group.description)
group.remote = remote_group
- IPPermissions.to(group, remote_group.ip_permissions) if remote_group.ip_permissions
+ if remote_group.ip_permissions && remote_group.ip_permissions.all?{|p| %w[icmp tcp udp].include?(p["ipProtocol"]) }
+ IPPermissions.to(group, remote_group.ip_permissions)
+ end
end
end
def missing_remote_groups
groups.select { |group| group.local? && !group.remote? }