terrafying-components 1.11.4 → 1.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9ba3f6790937e43326088e2e77daeb418ae044c68e45b0460aa392a06276db5
4
- data.tar.gz: a2e46ea27137ba9890caab6a35569bac628cd071f23bf462cc8df5d173ba4805
3
+ metadata.gz: be2a5e7920ea78ff4759ba8c31d27f65248365482582db2882c1d053e1a39a02
4
+ data.tar.gz: 6af01ed0b8c377381ba71f7119dc5c9ca2a115833c28cabeb17b8886d25f7550
5
5
  SHA512:
6
- metadata.gz: 95345ab09c06d5b69370bdb078207d464f371ab7d9a2b3eab31d3f9d662f5076682227adaf2ccfad5972355ce771ce654657e7191e4b18516488fb0ed393354b
7
- data.tar.gz: 5b0a8e035624fb3a4d4075e23d95da163c4af304187c45860fa799e64a758eba90fe4f3fa8ce74558071938ad2dcee5583edecdb41c8f48f005b9e943599a3f8
6
+ metadata.gz: 66072ec50c5cefb01b2c2a127bf71ef2bc8dd03a447508ab1f266152e3cc2ca306ce0327d6a83af6ea977a62ee6a0ba4f8fa2ddef35ec0b911e65932aa8f07d3
7
+ data.tar.gz: 8d0af4f38a9d65108d7797f821d182bd1c318c092079883a63d24e1124552069ea7363355b2764c2e9eb4517b6e4027a029485ccab3f7267088d1026505f7f02
@@ -71,7 +71,8 @@ module Terrafying
71
71
  subnets: vpc.subnets.fetch(:private, []),
72
72
  hex_ident: false,
73
73
  idle_timeout: nil,
74
- tags: {}
74
+ tags: {},
75
+ security_groups: [],
75
76
  }.merge(options)
76
77
 
77
78
  @tags = {
@@ -107,13 +108,17 @@ module Terrafying
107
108
  path_mtu_setup!
108
109
  end
109
110
 
111
+ if network? && options[:security_groups].count > 0
112
+ raise "You cannot set security groups on a network loadbalancer, set them on the instances behind it."
113
+ end
114
+
110
115
  @id = resource :aws_lb, ident, {
111
116
  name: ident,
112
117
  load_balancer_type: type,
113
118
  internal: !options[:public],
114
119
  tags: @tags,
115
120
  }.merge(subnets_for(options[:subnets]))
116
- .merge(application? ? { security_groups: [@security_group], idle_timeout: options[:idle_timeout], access_logs: options[:access_logs] } : {})
121
+ .merge(application? ? { security_groups: [@security_group] + options[:security_groups], idle_timeout: options[:idle_timeout], access_logs: options[:access_logs] } : {})
117
122
  .compact
118
123
 
119
124
  @targets = []
@@ -1,5 +1,5 @@
1
1
  module Terrafying
2
2
  module Components
3
- VERSION = "1.11.4"
3
+ VERSION = "1.11.5"
4
4
  end
5
5
  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: 1.11.4
4
+ version: 1.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - uSwitch Limited
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-28 00:00:00.000000000 Z
11
+ date: 2019-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler