ufo 6.3.4 → 6.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c98f420b247f0c49a22f00a8f700ac37b89c610a32a32d6368532411dd93dc13
4
- data.tar.gz: 4e2413294c3541dcfe6f207136fd2f466b3d723603d58bc97830f9aec2753a19
3
+ metadata.gz: 564a94e07c4dcf5cdea7b63623f1c5f7741487132fb14d3cfab36ea4c2ccb487
4
+ data.tar.gz: bfd797914511f0ce5750cd0102a9b8d79be50a4daaf4ad7c9b76e0578eb7bccb
5
5
  SHA512:
6
- metadata.gz: f0d8d600619c3b76738d0d1d909f4158904ea2483257755342e8b2121f9b6d96ae6cbfddaa2774e9ad67a258ebfd18ddd2cc0ea54f7be297de9f6c2635ba3bae
7
- data.tar.gz: 6f187d51020fd603d6b664763ff2930d6e1c0d883369acfa51d76d879c53cac87be348f14655ac92fc1ce9a5775a0c92298e04f6fda64c185b78ea29e5520e93
6
+ metadata.gz: c01fae80702562184e0e4a7c43d33ec75ef23d70d94776a8262609278c6ffe3dc32dce11100760f6cb7f63988494c058823b8c3e652065e07c5e75ddcd3ca58c
7
+ data.tar.gz: b5d8b619743945fd793ee7e62c264a9dd17ea16cceb59ccf563ba3f35c7a158a42e1c901882788aea74e56a02c50eabea1c3e6391c833331c7840ad591186658
data/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [6.3.7] - 2022-04-29
7
+ - [#173](https://github.com/tongueroo/ufo/pull/173) fix when ssl certs not used
8
+
9
+ ## [6.3.6] - 2022-04-29
10
+ - [#172](https://github.com/tongueroo/ufo/pull/172) support multiple ssl certs
11
+
12
+ ## [6.3.5] - 2022-04-28
13
+ - [#171](https://github.com/tongueroo/ufo/pull/171) default unhealthy_threshold_count = 3
14
+
6
15
  ## [6.3.4] - 2022-04-27
7
16
  - [#168](https://github.com/tongueroo/ufo/pull/168) ufo ps: show multiple container names
8
17
  - [#169](https://github.com/tongueroo/ufo/pull/169) ufo logs improvements
@@ -0,0 +1,32 @@
1
+ class Ufo::Cfn::Stack::Builder::Resources
2
+ class ListenerCertificate < ListenerSsl
3
+ def build
4
+ return unless certificates && certificates.size >= 1 # already removed firt cert
5
+ {
6
+ Type: "AWS::ElasticLoadBalancingV2::ListenerCertificate",
7
+ Condition: "CreateElbIsTrue",
8
+ Properties: properties,
9
+ }
10
+ end
11
+
12
+ def properties
13
+ {
14
+ Certificates: certificates,
15
+ ListenerArn: {Ref: "ListenerSsl"}
16
+ }
17
+ end
18
+
19
+ def certificates
20
+ ssl = Ufo.config.elb.ssl
21
+ if ssl.certificates
22
+ certs = normalize(ssl.certificates)
23
+ # CloudFormation has weird interface
24
+ # Only one cert allowed at the AWS::ElasticLoadBalancingV2::Listener
25
+ # https://stackoverflow.com/questions/54447250/how-to-set-multiple-certificates-for-awselasticloadbalancingv2listener
26
+ # Also note the docs say "You can specify one certificate per resource."
27
+ # But tested and multiple certs here work
28
+ certs[1..-1] # dont include the first one
29
+ end
30
+ end
31
+ end
32
+ end
@@ -7,7 +7,10 @@ class Ufo::Cfn::Stack::Builder::Resources
7
7
 
8
8
  def properties
9
9
  props = super
10
- props[:Certificates] = certificates
10
+ # CloudFormation has weird interface
11
+ # Only one cert allowed at the AWS::ElasticLoadBalancingV2::Listener
12
+ # https://stackoverflow.com/questions/54447250/how-to-set-multiple-certificates-for-awselasticloadbalancingv2listener
13
+ props[:Certificates] = [certificates.first] # first one only
11
14
  props
12
15
  end
13
16
 
@@ -10,6 +10,7 @@ class Ufo::Cfn::Stack::Builder
10
10
  ElbSecurityGroup: SecurityGroup::Elb.build(@options),
11
11
  ExecutionRole: IamRoles::ExecutionRole.build(@options),
12
12
  Listener: Listener.build(@options),
13
+ ListenerCertificate: ListenerCertificate.build(@options),
13
14
  ListenerSsl: ListenerSsl.build(@options),
14
15
  TargetGroup: TargetGroup.build(@options),
15
16
  TaskDefinition: TaskDefinition.build(@options),
data/lib/ufo/config.rb CHANGED
@@ -70,7 +70,7 @@ module Ufo
70
70
  config.elb.health_check_interval_seconds = 10 # keep at 10 in case of network ELB, which is min 10
71
71
  config.elb.health_check_path = nil # When nil its AWS default /
72
72
  config.elb.healthy_threshold_count = 3 # The AWS usual default is 5
73
- config.elb.unhealthy_threshold_count = 2
73
+ config.elb.unhealthy_threshold_count = 3
74
74
 
75
75
  config.elb.port = 80 # default listener port
76
76
  config.elb.redirect = ActiveSupport::OrderedOptions.new
data/lib/ufo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "6.3.4"
2
+ VERSION = "6.3.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.4
4
+ version: 6.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-27 00:00:00.000000000 Z
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-logs
@@ -516,6 +516,7 @@ files:
516
516
  - lib/ufo/cfn/stack/builder/resources/iam_roles/execution_role.rb
517
517
  - lib/ufo/cfn/stack/builder/resources/iam_roles/task_role.rb
518
518
  - lib/ufo/cfn/stack/builder/resources/listener.rb
519
+ - lib/ufo/cfn/stack/builder/resources/listener_certificate.rb
519
520
  - lib/ufo/cfn/stack/builder/resources/listener_ssl.rb
520
521
  - lib/ufo/cfn/stack/builder/resources/scaling/base.rb
521
522
  - lib/ufo/cfn/stack/builder/resources/scaling/policy.rb