ufo 6.3.5 → 6.3.6

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: c7412fed5f36c54bd78f76bfb6debb841d3f867ea25ef4625a31c9e205a1e955
4
- data.tar.gz: a0d91c95a050d2fbce2731c10387651fb2909c3dc65a4e2af60a6cf780d3e1b7
3
+ metadata.gz: 586d1502a32e9d1e3aa5a8447371c5b9fc854f189a841b9a822ce2cef4156c0b
4
+ data.tar.gz: 03607a2573b1a27c245f2b42614589513250fa91f2c8c69b5f8767664083aeb9
5
5
  SHA512:
6
- metadata.gz: 6ee413ef0571f90417c37327d78fbb86c8fab10584746dfcbec86d292ce3f8dad8d31d53d3a939db6b9a2f91639d50ed4f876262d84c40c453ad22e610a7b46f
7
- data.tar.gz: c8fe10ab749b98820faa9105584175b1c97cfcd7ecee92a1bf75e7d1623ed158c86b2ac32a834a8f4b617e252dca6c28682f8a3e4664f8dac03785117ab26bb8
6
+ metadata.gz: b9b72a9063f47a628cf5455f91a9db1f6db89e74416b54a30cd21724a010d4bd040e31b48caf4d2fec381e88d06d4efb8e8202b3d31e2ac7d8913e38a669ec1b
7
+ data.tar.gz: 29d841dd38e9ba2b2132adf00689b9e39eb34dcf3436601d70f7d78675f9b4eece5f08739a29ac9bfd6c0f3762ec4867d72ea9df1b681fe77f04290da3c498af
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
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.6] - 2022-04-29
7
+ - [#172](https://github.com/tongueroo/ufo/pull/172) support multiple ssl certs
8
+
6
9
  ## [6.3.5] - 2022-04-28
7
10
  - [#171](https://github.com/tongueroo/ufo/pull/171) default unhealthy_threshold_count = 3
8
11
 
@@ -0,0 +1,30 @@
1
+ class Ufo::Cfn::Stack::Builder::Resources
2
+ class ListenerCertificate < ListenerSsl
3
+ def build
4
+ return unless 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
+ certs = normalize(ssl.certificates) if ssl.certificates
22
+ # CloudFormation has weird interface
23
+ # Only one cert allowed at the AWS::ElasticLoadBalancingV2::Listener
24
+ # https://stackoverflow.com/questions/54447250/how-to-set-multiple-certificates-for-awselasticloadbalancingv2listener
25
+ # Also note the docs say "You can specify one certificate per resource."
26
+ # But tested and multiple certs here work
27
+ certs[1..-1] # dont include the first one
28
+ end
29
+ end
30
+ 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/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "6.3.5"
2
+ VERSION = "6.3.6"
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.5
4
+ version: 6.3.6
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-28 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