terrafying-components 1.6.6 → 1.6.7
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 +4 -4
- data/lib/terrafying/components/usable.rb +7 -7
- data/lib/terrafying/components/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: faec475d282b6b0d64b4233889f861aab40a64a37a746d9dbe9433b3f76899b3
|
4
|
+
data.tar.gz: e2e7bc41156404be15c4a542cbe9b86ad98c26193a8c08386a073357ca4385e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9f286c6a05b7b72827f8cf50f4391e4b6ac373566baf3fe597ea5390973fff7d770f35ba4b8d25d07afc717ab003e159d1cd0249718d7f5059b0eeb04f2fbf1
|
7
|
+
data.tar.gz: 2314cda2677a34077ec0daf094b9b73f681374ed5bfc61d4dc783a21be3ef9de476aff6ca423b81bd6c2bed84d5a300b22b8b58d9b21f5879a8e1f82c549c408
|
@@ -41,18 +41,18 @@ module Terrafying
|
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
44
|
-
def used_by_cidr(*cidrs)
|
44
|
+
def used_by_cidr(*cidrs, &block)
|
45
45
|
cidrs.map { |cidr|
|
46
|
-
cidr_ident = cidr.
|
46
|
+
cidr_ident = cidr.tr('./', '-')
|
47
47
|
|
48
|
-
@ports.map {|port|
|
48
|
+
@ports.select(&block).map { |port|
|
49
49
|
resource :aws_security_group_rule, "#{@name}-to-#{cidr_ident}-#{port[:name]}", {
|
50
|
-
security_group_id:
|
50
|
+
security_group_id: ingress_security_group,
|
51
51
|
type: "ingress",
|
52
52
|
from_port: from_port(port[:upstream_port]),
|
53
53
|
to_port: to_port(port[:upstream_port]),
|
54
54
|
protocol: port[:type] == "udp" ? "udp" : "tcp",
|
55
|
-
cidr_blocks: [cidr]
|
55
|
+
cidr_blocks: [cidr]
|
56
56
|
}
|
57
57
|
}
|
58
58
|
}
|
@@ -98,9 +98,9 @@ module Terrafying
|
|
98
98
|
}
|
99
99
|
end
|
100
100
|
|
101
|
-
def used_by(*other_resources)
|
101
|
+
def used_by(*other_resources, &block)
|
102
102
|
other_resources.map { |other_resource|
|
103
|
-
@ports.map {|port|
|
103
|
+
@ports.select(&block).map.map {|port|
|
104
104
|
resource :aws_security_group_rule, "#{@name}-to-#{other_resource.name}-#{port[:name]}", {
|
105
105
|
security_group_id: self.ingress_security_group,
|
106
106
|
type: "ingress",
|