awspec 0.65.1 → 0.65.2

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
  SHA1:
3
- metadata.gz: 7bdaf3ed35641e1264355ea19d1be4b198695d67
4
- data.tar.gz: 6ea567eafc4f3678490e5f4f941a657732c89bd5
3
+ metadata.gz: c5a96c7e4a0022412a89fa08c8a6fe1af55ddbef
4
+ data.tar.gz: 8bb3a41eb66171da8e6f3cca3096b051fca40d00
5
5
  SHA512:
6
- metadata.gz: 3c9398c10efca166d15957d5713521789ab10c9e1bc9f1c45b1fbe92447206d0e189b3399cb9576f73ead0c31e355604462c2160e8792482cbd668ef5e263fbf
7
- data.tar.gz: f58ac20a8273c4444f4e0915b42ac771d9eceab7b5dc451ac9106b07e387ec6f9d49c9373ed4381a080b6d4b8055def947200786e4ed9001ab0699d22ee96b87
6
+ metadata.gz: 8b1e05e3132152c79f0733a6efcaf953025f0666abf0492a7b2fda8cd767d1c105b52346017a4a9dbe279b6a8375ba07ce2cd2678328dbe1e4a9043dd3bcc982
7
+ data.tar.gz: 09ac078215b3f60c2d791c1b300f8ae8a32cea0b499ea8c33ffd09a4206833e74b57473848d4d729dfc7bcc5efce27b727246afa6fe4fc5f11dbee3fa5964ba3
@@ -4,6 +4,7 @@ Aws.config[:ec2] = {
4
4
  security_groups: [
5
5
  {
6
6
  vpc_id: 'vpc-ab123cde',
7
+ owner_id: '112233445566',
7
8
  group_id: 'sg-1a2b3cd4',
8
9
  group_name: 'my-security-group-name',
9
10
  tags: [
@@ -110,6 +111,22 @@ Aws.config[:ec2] = {
110
111
  cidr_ip: '100.456.789.012/32'
111
112
  }
112
113
  ]
114
+ },
115
+ {
116
+ from_port: 8080,
117
+ to_port: 8080,
118
+ ip_protocol: 'tcp',
119
+ ip_ranges: [],
120
+ user_id_group_pairs: [
121
+ {
122
+ user_id: '5678901234',
123
+ group_name: 'group-in-other-aws-account-with-vpc-peering',
124
+ group_id: 'sg-9a8b7c6d',
125
+ vpc_id: 'vpc-5b6a7c8f',
126
+ vpc_peering_connection_id: 'pcx-f9e8d7c6',
127
+ peering_status: 'active'
128
+ }
129
+ ]
113
130
  }
114
131
  ]
115
132
  }
@@ -96,6 +96,11 @@ module Awspec::Type
96
96
  end
97
97
  return true if ret.count > 0
98
98
  ret = permission.user_id_group_pairs.select do |sg|
99
+ # Compare the sg group_name if the remote group is in another account.
100
+ # find_security_group call doesn't return info on a remote security group.
101
+ if !sg.user_id.nil? && (sg.user_id != resource_via_client.owner_id)
102
+ next (sg.group_name == cidr) || (sg.group_id == cidr)
103
+ end
99
104
  next true if sg.group_id == cidr
100
105
  sg2 = find_security_group(sg.group_id)
101
106
  next true if sg2.group_name == cidr
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '0.65.1'
2
+ VERSION = '0.65.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.65.1
4
+ version: 0.65.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-03 00:00:00.000000000 Z
11
+ date: 2017-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec