terrafying-components 1.15.26 → 1.15.27
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 +0 -4
- data/lib/terrafying/components/instance.rb +1 -8
- data/lib/terrafying/components/loadbalancer.rb +4 -9
- data/lib/terrafying/components/service.rb +0 -4
- data/lib/terrafying/components/staticset.rb +1 -1
- data/lib/terrafying/components/version.rb +1 -1
- data/lib/terrafying/components/vpc.rb +4 -15
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4aa8556484984beeff3e8516069c2f4c19ed362dc40cb9c5e1388b7db6b3a30
|
|
4
|
+
data.tar.gz: 8496a24598cb73692342fb02891d061c492fb5c4e6de6a236ab268551d7c3b58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e30aafb4b832acfc1a01e282feab7929ba43a646ef4524bd1cf109062cd31ebcbbbd53f848e541abb8c248535e682b30911072c1939b3ab35c41d29e47030b8
|
|
7
|
+
data.tar.gz: 4e7c93e9ddf5beff6bd06b7960936f96e940f79ca089d2a092c8ab4108bac1092e213727907979741c09d29d20fb6b75e1f5cef4be792bba1945d9fd29c7d55d
|
|
@@ -44,12 +44,9 @@ module Terrafying
|
|
|
44
44
|
subnets: vpc.subnets.fetch(:private, []),
|
|
45
45
|
depends_on: [],
|
|
46
46
|
rolling_update: :simple,
|
|
47
|
-
metadata_options: nil,
|
|
48
47
|
vpc_endpoints_egress: []
|
|
49
48
|
}.merge(options)
|
|
50
49
|
|
|
51
|
-
metadata_options = options[:metadata_options]
|
|
52
|
-
|
|
53
50
|
ident = "#{tf_safe(vpc.name)}-#{name}"
|
|
54
51
|
|
|
55
52
|
@name = ident
|
|
@@ -88,7 +85,6 @@ module Terrafying
|
|
|
88
85
|
lifecycle: {
|
|
89
86
|
create_before_destroy: true
|
|
90
87
|
},
|
|
91
|
-
metadata_options: options[:metadata_options],
|
|
92
88
|
depends_on: resource_name_from(options[:instance_profile])
|
|
93
89
|
|
|
94
90
|
if options[:instances][:track]
|
|
@@ -36,7 +36,6 @@ module Terrafying
|
|
|
36
36
|
instance_profile: nil,
|
|
37
37
|
ports: [],
|
|
38
38
|
tags: {},
|
|
39
|
-
metadata_options: nil,
|
|
40
39
|
security_groups: [],
|
|
41
40
|
depends_on: []
|
|
42
41
|
}.merge(options)
|
|
@@ -56,12 +55,7 @@ module Terrafying
|
|
|
56
55
|
from_port: 0,
|
|
57
56
|
to_port: 0,
|
|
58
57
|
protocol: -1,
|
|
59
|
-
cidr_blocks: ['0.0.0.0/0']
|
|
60
|
-
ipv6_cidr_blocks: nil,
|
|
61
|
-
prefix_list_ids: nil,
|
|
62
|
-
security_groups: nil,
|
|
63
|
-
self: nil,
|
|
64
|
-
description: nil
|
|
58
|
+
cidr_blocks: ['0.0.0.0/0']
|
|
65
59
|
}
|
|
66
60
|
]
|
|
67
61
|
|
|
@@ -105,7 +99,6 @@ module Terrafying
|
|
|
105
99
|
vpc.internal_ssh_security_group
|
|
106
100
|
].push(*options[:security_groups]),
|
|
107
101
|
user_data: options[:user_data],
|
|
108
|
-
metadata_options: options[:metadata_options],
|
|
109
102
|
lifecycle: {
|
|
110
103
|
create_before_destroy: true
|
|
111
104
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'digest
|
|
3
|
+
require 'digest'
|
|
4
4
|
require 'terrafying/components/usable'
|
|
5
5
|
require 'terrafying/generator'
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
require_relative './ports'
|
|
8
8
|
|
|
9
9
|
module Terrafying
|
|
@@ -216,14 +216,9 @@ module Terrafying
|
|
|
216
216
|
end
|
|
217
217
|
|
|
218
218
|
def make_identifier(type, vpc_name, name)
|
|
219
|
+
gen_id = "#{type}-#{tf_safe(vpc_name)}-#{name}"
|
|
220
|
+
return Digest::SHA2.hexdigest(gen_id)[0..24] if @hex_ident || gen_id.size > 26
|
|
219
221
|
|
|
220
|
-
gen_id = "#{type}-#{vpc_name}-#{name}"
|
|
221
|
-
hex = Digest::SHA2.hexdigest(gen_id)[0..24]
|
|
222
|
-
if hex[0..0] =~ /[a-z]/
|
|
223
|
-
return hex if @hex_ident || gen_id.size > 26
|
|
224
|
-
else return Digest::SHA256.bubblebabble(gen_id)[0..15]
|
|
225
|
-
end
|
|
226
|
-
|
|
227
222
|
gen_id[0..31]
|
|
228
223
|
end
|
|
229
224
|
end
|
|
@@ -59,7 +59,6 @@ module Terrafying
|
|
|
59
59
|
subnets: vpc.subnets.fetch(:private, []),
|
|
60
60
|
startup_grace_period: 300,
|
|
61
61
|
depends_on: [],
|
|
62
|
-
metadata_options: nil,
|
|
63
62
|
audit_role: "arn:aws:iam::#{aws.account_id}:role/auditd_logging",
|
|
64
63
|
metrics_ports: [],
|
|
65
64
|
vpc_endpoints_egress: []
|
|
@@ -97,8 +96,6 @@ module Terrafying
|
|
|
97
96
|
@instance_profile = add! InstanceProfile.create(ident, statements: iam_statements)
|
|
98
97
|
end
|
|
99
98
|
|
|
100
|
-
metadata_options = options[:metadata_options]
|
|
101
|
-
|
|
102
99
|
tags = options[:tags].merge(service_name: name)
|
|
103
100
|
|
|
104
101
|
set = options[:instances].is_a?(Hash) ? DynamicSet : StaticSet
|
|
@@ -115,7 +112,6 @@ module Terrafying
|
|
|
115
112
|
instance_set_options = {
|
|
116
113
|
instance_profile: @instance_profile,
|
|
117
114
|
depends_on: depends_on,
|
|
118
|
-
metadata_options: metadata_options,
|
|
119
115
|
tags: tags
|
|
120
116
|
}
|
|
121
117
|
|
|
@@ -38,7 +38,7 @@ module Terrafying
|
|
|
38
38
|
options = {
|
|
39
39
|
public: false,
|
|
40
40
|
eip: false,
|
|
41
|
-
ami: aws.ami('base-image-fc-
|
|
41
|
+
ami: aws.ami('base-image-fc-2860fb52', owners = ['136393635417']),
|
|
42
42
|
instance_type: 't3a.micro',
|
|
43
43
|
subnets: vpc.subnets.fetch(:private, []),
|
|
44
44
|
ports: [],
|
|
@@ -5,7 +5,6 @@ require 'netaddr'
|
|
|
5
5
|
require 'terrafying/components/subnet'
|
|
6
6
|
require 'terrafying/components/zone'
|
|
7
7
|
require 'terrafying/generator'
|
|
8
|
-
require 'digest/bubblebabble'
|
|
9
8
|
|
|
10
9
|
module Terrafying
|
|
11
10
|
module Components
|
|
@@ -185,12 +184,7 @@ module Terrafying
|
|
|
185
184
|
from_port: 22,
|
|
186
185
|
to_port: 22,
|
|
187
186
|
protocol: 'tcp',
|
|
188
|
-
cidr_blocks: [@cidr]
|
|
189
|
-
description: nil,
|
|
190
|
-
ipv6_cidr_blocks: nil,
|
|
191
|
-
prefix_list_ids: nil,
|
|
192
|
-
security_groups: nil,
|
|
193
|
-
self: nil
|
|
187
|
+
cidr_blocks: [@cidr]
|
|
194
188
|
}
|
|
195
189
|
],
|
|
196
190
|
egress: [
|
|
@@ -198,12 +192,7 @@ module Terrafying
|
|
|
198
192
|
from_port: 22,
|
|
199
193
|
to_port: 22,
|
|
200
194
|
protocol: 'tcp',
|
|
201
|
-
cidr_blocks: [@cidr]
|
|
202
|
-
description: nil,
|
|
203
|
-
ipv6_cidr_blocks: nil,
|
|
204
|
-
prefix_list_ids: nil,
|
|
205
|
-
security_groups: nil,
|
|
206
|
-
self: nil
|
|
195
|
+
cidr_blocks: [@cidr]
|
|
207
196
|
}
|
|
208
197
|
]
|
|
209
198
|
self
|
|
@@ -244,7 +233,7 @@ module Terrafying
|
|
|
244
233
|
subnets: @subnets.values.flatten
|
|
245
234
|
}.merge(options)
|
|
246
235
|
|
|
247
|
-
ident = tf_safe(
|
|
236
|
+
ident = tf_safe(ip_address)
|
|
248
237
|
|
|
249
238
|
if options[:tunnels].count > 2
|
|
250
239
|
raise 'You can only define a max of two tunnels'
|
|
@@ -294,7 +283,7 @@ module Terrafying
|
|
|
294
283
|
route_tables.product(cidrs).each do |route_table, cidr|
|
|
295
284
|
hash = Digest::SHA2.hexdigest "#{route_table}-#{tf_safe(cidr)}"
|
|
296
285
|
|
|
297
|
-
resource :aws_route, "#{@name}-to-#{
|
|
286
|
+
resource :aws_route, "#{@name}-to-#{ident}-peer-#{hash}",
|
|
298
287
|
route_table_id: route_table,
|
|
299
288
|
destination_cidr_block: cidr,
|
|
300
289
|
gateway_id: vpn_gateway
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: terrafying-components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.15.
|
|
4
|
+
version: 1.15.27
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- uSwitch Limited
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-12-
|
|
11
|
+
date: 2020-12-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|