terrafying-components 2.0.10 → 2.1.0
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/loadbalancer.rb +13 -1
- data/lib/terrafying/components/version.rb +1 -1
- 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: 0f7daf4d56be1749a0505aa8b99cf01170a2dc98d4460ce1a071e4956798ae00
|
4
|
+
data.tar.gz: 98309d3622147a3cd4b9f89e9d548cd09fc88003d79faa5c1c37f5a20d5c5672
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b91ab228e8faa8d2166516faf4e0c263c0aef5ba5476d62572352ce1733cb95e3369724039ccc540e7183c947cef1d1266418948095ad3522d7147e79f132e98
|
7
|
+
data.tar.gz: d0e852429b7ec2bef6ab2fe7a5670d17fe00c2a51b9f8a87cda2b01a01103048c1175046c9646a8cafb0cf4e6c2548e2703791ce5a943e8325f2c5f8a8e5d86f
|
@@ -127,15 +127,20 @@ module Terrafying
|
|
127
127
|
port_ident = "#{ident}-#{port[:downstream_port]}"
|
128
128
|
port_name = "#{@name}-#{port[:downstream_port]}"
|
129
129
|
|
130
|
+
actions = []
|
131
|
+
|
130
132
|
default_action = port.key?(:action) ? port[:action] : forward_to_tg(port, port_ident, port_name, vpc)
|
131
133
|
|
134
|
+
actions.append(default_action)
|
135
|
+
actions.append(authenticate_oidc(port[:oidc_config])) if !port[:oidc_config].nil?
|
136
|
+
|
132
137
|
ssl_options = alb_certs(port, port_ident)
|
133
138
|
|
134
139
|
listener = resource :aws_lb_listener, port_ident, {
|
135
140
|
load_balancer_arn: @id,
|
136
141
|
port: port[:upstream_port],
|
137
142
|
protocol: port[:type].upcase,
|
138
|
-
default_action:
|
143
|
+
default_action: actions
|
139
144
|
}.merge(ssl_options)
|
140
145
|
|
141
146
|
register_target(default_action[:target_group_arn], listener) if default_action[:type] == 'forward'
|
@@ -163,6 +168,13 @@ module Terrafying
|
|
163
168
|
}
|
164
169
|
end
|
165
170
|
|
171
|
+
def authenticate_oidc(oidc_config)
|
172
|
+
{
|
173
|
+
type: "authenticate-oidc",
|
174
|
+
authenticate_oidc: oidc_config
|
175
|
+
}
|
176
|
+
end
|
177
|
+
|
166
178
|
def register_target(target_group, listener)
|
167
179
|
@targets << Struct::Target.new(
|
168
180
|
target_group: target_group,
|
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: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uSwitch Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|