terrafying-components 1.10.4 → 1.10.5
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/dynamicset.rb +19 -13
- data/lib/terrafying/components/staticset.rb +18 -13
- 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: ec33549375f3c5a5358b324537c19e1f0ea2216d0daa9ec4e2c4b03a321a6eea
|
4
|
+
data.tar.gz: 64ef01c017e9389fce36879e1ab1193ed25ee2badb36ce5b82c9a48c149ae682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14210c35fb732bd58c155369a4158bce8ebf13a7746071d5ca551fdb1f27060a7439ca7a8a44793875cd08e176ac7de3120a7520966b8c820692dd08d8f28dcb
|
7
|
+
data.tar.gz: f091c0aca5fefa02b2d3058a42ca017027d9b95a5d2382332e17a8198cfcd07fd4389a090e91cd3c71fb76004582e434fa5109a5d113200b5e742b3bb0ef1be1
|
@@ -53,19 +53,13 @@ module Terrafying
|
|
53
53
|
@ports = enrich_ports(options[:ports])
|
54
54
|
|
55
55
|
@security_group = resource :aws_security_group, ident, {
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
to_port: 0,
|
64
|
-
protocol: -1,
|
65
|
-
cidr_blocks: ["0.0.0.0/0"],
|
66
|
-
}
|
67
|
-
],
|
68
|
-
}
|
56
|
+
name: "dynamicset-#{ident}",
|
57
|
+
description: "Describe the ingress and egress of the service #{ident}",
|
58
|
+
tags: options[:tags],
|
59
|
+
vpc_id: vpc.id
|
60
|
+
}
|
61
|
+
|
62
|
+
default_egress_rule(ident, @security_group)
|
69
63
|
|
70
64
|
path_mtu_setup!
|
71
65
|
|
@@ -123,6 +117,18 @@ module Terrafying
|
|
123
117
|
self
|
124
118
|
end
|
125
119
|
|
120
|
+
|
121
|
+
def default_egress_rule(ident, security_group)
|
122
|
+
resource :aws_security_group_rule, "#{ident}-default-egress", {
|
123
|
+
security_group_id: security_group,
|
124
|
+
type: 'egress',
|
125
|
+
from_port: 0,
|
126
|
+
to_port: 0,
|
127
|
+
protocol: -1,
|
128
|
+
cidr_blocks: ['0.0.0.0/0'],
|
129
|
+
}
|
130
|
+
end
|
131
|
+
|
126
132
|
def profile_from(profile)
|
127
133
|
profile.respond_to?(:id) ? profile.id : profile
|
128
134
|
end
|
@@ -59,19 +59,13 @@ module Terrafying
|
|
59
59
|
@ports = enrich_ports(options[:ports])
|
60
60
|
|
61
61
|
@security_group = resource :aws_security_group, ident, {
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
to_port: 0,
|
70
|
-
protocol: -1,
|
71
|
-
cidr_blocks: ["0.0.0.0/0"],
|
72
|
-
}
|
73
|
-
],
|
74
|
-
}
|
62
|
+
name: "staticset-#{ident}",
|
63
|
+
description: "Describe the ingress and egress of the static set #{ident}",
|
64
|
+
tags: options[:tags],
|
65
|
+
vpc_id: vpc.id,
|
66
|
+
}
|
67
|
+
|
68
|
+
default_egress_rule(ident, @security_group)
|
75
69
|
|
76
70
|
path_mtu_setup!
|
77
71
|
|
@@ -113,6 +107,17 @@ module Terrafying
|
|
113
107
|
self
|
114
108
|
end
|
115
109
|
|
110
|
+
def default_egress_rule(ident, security_group)
|
111
|
+
resource :aws_security_group_rule, "#{ident}-default-egress", {
|
112
|
+
security_group_id: security_group,
|
113
|
+
type: 'egress',
|
114
|
+
from_port: 0,
|
115
|
+
to_port: 0,
|
116
|
+
protocol: -1,
|
117
|
+
cidr_blocks: ['0.0.0.0/0'],
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
116
121
|
def volume_for(name, instance, volume, tags)
|
117
122
|
vol_opts = {
|
118
123
|
availability_zone: instance.subnet.az,
|