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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d751cc6be7a7a3a29dd3e588cc120ec3fa1d8b3ea3b0155888551d4c74a0f6d
4
- data.tar.gz: a55c971cf8196a9ce42f3ae5b57d35219aa1b7d6e42a0b43107866095a1a4621
3
+ metadata.gz: 0f7daf4d56be1749a0505aa8b99cf01170a2dc98d4460ce1a071e4956798ae00
4
+ data.tar.gz: 98309d3622147a3cd4b9f89e9d548cd09fc88003d79faa5c1c37f5a20d5c5672
5
5
  SHA512:
6
- metadata.gz: c2b2a37884426731df2c879547a3df0bf314e1314f2ec52c706606082b53520c0170cfdcfbfc64e1a3faf3c6bb720f2a76c2fcc74f106436d9f28f4030b4cc63
7
- data.tar.gz: 4222b381c2056081c80c1a47f03376921e361129ff00979614ca52fbb6464934a565661778ba66ff4ff6bf7b73e71422b1221546ea3e73c5fa5cc3be4f1780a6
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: 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,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Terrafying
4
4
  module Components
5
- VERSION = '2.0.10'
5
+ VERSION = '2.1.0'
6
6
  end
7
7
  end
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.10
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-08 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake