ufo 6.3.7 → 6.3.10
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/CHANGELOG.md +10 -0
- data/lib/ufo/cfn/stack/builder/resources/ecs_service.rb +6 -1
- data/lib/ufo/cfn/stack/builder/resources/elb.rb +1 -1
- data/lib/ufo/cfn/stack/builder/resources/listener.rb +3 -2
- data/lib/ufo/cfn/stack/builder/resources/listener_ssl.rb +5 -1
- data/lib/ufo/cfn/stack/builder/resources/target_group.rb +6 -1
- data/lib/ufo/cfn/stack/vars.rb +5 -0
- data/lib/ufo/cfn/stack.rb +1 -1
- data/lib/ufo/cli/help/new/env_file.md +11 -0
- data/lib/ufo/cli/new/env_file.rb +1 -1
- data/lib/ufo/config.rb +6 -0
- data/lib/ufo/task_definition/helpers/vars/builder.rb +9 -2
- data/lib/ufo/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d85a0063b688b43736f0b7e252e314d70d98d05871bd43238fb630b84336fea
|
4
|
+
data.tar.gz: 99baad01439788788a8a0683c03fbbbaa2af925ffc8cc09026c8d57b61e0f1fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b38a61b1adc53e520c526b0d8d72bae8812b0cb17cb58d77c17af1e6dc823a1f671b0725ef77ecb587a2f30aed6847e4f3a669d88a2f05489721b4651eae86d2
|
7
|
+
data.tar.gz: 2958ec8b2aa3c5b69ac348fad209a5964528d4e8cb1101507e7bbddbf504c23f407181d9c9e394ec73b2f117758beb7ddba76e6953b8f48d2d08776615213279
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,16 @@
|
|
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.10] - 2022-06-23
|
7
|
+
- [#177](https://github.com/tongueroo/ufo/pull/177) Enabled support for gRPC
|
8
|
+
|
9
|
+
## [6.3.9] - 2022-05-09
|
10
|
+
- [#175](https://github.com/tongueroo/ufo/pull/175) Secrets autofix and add missing trailing ::
|
11
|
+
- new env_file
|
12
|
+
|
13
|
+
## [6.3.8] - 2022-05-02
|
14
|
+
- [#174](https://github.com/tongueroo/ufo/pull/174) fix update rollback failed user friendly error message
|
15
|
+
|
6
16
|
## [6.3.7] - 2022-04-29
|
7
17
|
- [#173](https://github.com/tongueroo/ufo/pull/173) fix when ssl certs not used
|
8
18
|
|
@@ -6,11 +6,16 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
6
6
|
Properties: properties
|
7
7
|
}
|
8
8
|
|
9
|
-
attrs[:DependsOn] =
|
9
|
+
attrs[:DependsOn] = depends_on
|
10
10
|
|
11
11
|
attrs
|
12
12
|
end
|
13
13
|
|
14
|
+
def depends_on
|
15
|
+
return unless vars[:create_elb]
|
16
|
+
vars[:create_listener] ? "Listener" : "ListenerSsl"
|
17
|
+
end
|
18
|
+
|
14
19
|
def properties
|
15
20
|
props = {
|
16
21
|
Cluster: @cluster,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class Ufo::Cfn::Stack::Builder::Resources
|
2
2
|
class Listener < Base
|
3
3
|
def build
|
4
|
+
return unless vars[:create_listener]
|
4
5
|
{
|
5
6
|
Type: "AWS::ElasticLoadBalancingV2::Listener",
|
6
7
|
Condition: "CreateElbIsTrue",
|
@@ -18,11 +19,11 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def protocol
|
21
|
-
vars[:default_listener_protocol]
|
22
|
+
Ufo.config.elb.protocol || vars[:default_listener_protocol]
|
22
23
|
end
|
23
24
|
|
24
25
|
def port
|
25
|
-
|
26
|
+
Ufo.config.elb.port
|
26
27
|
end
|
27
28
|
|
28
29
|
def default_actions
|
@@ -2,7 +2,11 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
2
2
|
class ListenerSsl < Listener
|
3
3
|
def build
|
4
4
|
return unless vars[:create_listener_ssl]
|
5
|
-
|
5
|
+
{
|
6
|
+
Type: "AWS::ElasticLoadBalancingV2::Listener",
|
7
|
+
Condition: "CreateElbIsTrue",
|
8
|
+
Properties: properties,
|
9
|
+
}
|
6
10
|
end
|
7
11
|
|
8
12
|
def properties
|
@@ -18,7 +18,6 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
18
18
|
}
|
19
19
|
],
|
20
20
|
Protocol: vars[:default_target_group_protocol],
|
21
|
-
Port: 80,
|
22
21
|
HealthCheckIntervalSeconds: 10,
|
23
22
|
HealthyThresholdCount: 2,
|
24
23
|
UnhealthyThresholdCount: 2,
|
@@ -36,6 +35,9 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
36
35
|
props[:HealthCheckIntervalSeconds] = health_check_interval_seconds
|
37
36
|
props[:HealthyThresholdCount] = healthy_threshold_count
|
38
37
|
props[:UnhealthyThresholdCount] = unhealthy_threshold_count
|
38
|
+
props[:Matcher] = matcher
|
39
|
+
props[:ProtocolVersion] = protocol_version
|
40
|
+
props[:Port] = port
|
39
41
|
|
40
42
|
props
|
41
43
|
end
|
@@ -45,6 +47,9 @@ class Ufo::Cfn::Stack::Builder::Resources
|
|
45
47
|
health_check_path
|
46
48
|
healthy_threshold_count
|
47
49
|
unhealthy_threshold_count
|
50
|
+
matcher
|
51
|
+
protocol_version
|
52
|
+
port
|
48
53
|
]
|
49
54
|
delegate *meths, to: :elb
|
50
55
|
def elb
|
data/lib/ufo/cfn/stack/vars.rb
CHANGED
@@ -8,6 +8,7 @@ class Ufo::Cfn::Stack
|
|
8
8
|
cluster: @cluster,
|
9
9
|
container: container,
|
10
10
|
create_elb: create_elb?, # helps set Ecs DependsOn
|
11
|
+
create_listener: create_listener?,
|
11
12
|
create_listener_ssl: create_listener_ssl?,
|
12
13
|
create_route53: create_route53?,
|
13
14
|
default_listener_protocol: default_listener_protocol,
|
@@ -58,6 +59,10 @@ class Ufo::Cfn::Stack
|
|
58
59
|
elb_type == 'network' ? 'TCP' : 'HTTP'
|
59
60
|
end
|
60
61
|
|
62
|
+
def create_listener?
|
63
|
+
Ufo.config.elb.listener.enabled
|
64
|
+
end
|
65
|
+
|
61
66
|
# if the configuration is set to anything then enable it
|
62
67
|
def create_listener_ssl?
|
63
68
|
elb = Ufo.config.elb
|
data/lib/ufo/cfn/stack.rb
CHANGED
@@ -110,7 +110,7 @@ module Ufo::Cfn
|
|
110
110
|
when /state and can not be updated/
|
111
111
|
logger.info "The #{@stack_name} stack is in a state that cannot be updated. Deleted the stack and try again."
|
112
112
|
logger.info "ERROR: #{e.message}"
|
113
|
-
if message.include?('UPDATE_ROLLBACK_FAILED')
|
113
|
+
if e.message.include?('UPDATE_ROLLBACK_FAILED')
|
114
114
|
logger.info "You might be able to do a 'Continue Update Rollback' and skip some resources to get the stack back into a good state."
|
115
115
|
end
|
116
116
|
url = "https://console.aws.amazon.com/cloudformation/home?region=#{region}"
|
data/lib/ufo/cli/new/env_file.rb
CHANGED
data/lib/ufo/config.rb
CHANGED
@@ -72,12 +72,18 @@ module Ufo
|
|
72
72
|
config.elb.healthy_threshold_count = 3 # The AWS usual default is 5
|
73
73
|
config.elb.unhealthy_threshold_count = 3
|
74
74
|
|
75
|
+
config.elb.listener = ActiveSupport::OrderedOptions.new
|
76
|
+
config.elb.listener.enabled = true
|
77
|
+
config.elb.matcher = nil
|
75
78
|
config.elb.port = 80 # default listener port
|
79
|
+
config.elb.protocol = nil
|
80
|
+
config.elb.protocol_version = nil
|
76
81
|
config.elb.redirect = ActiveSupport::OrderedOptions.new
|
77
82
|
config.elb.redirect.code = 302 # IE: 302 or 301
|
78
83
|
config.elb.redirect.enabled = false
|
79
84
|
config.elb.redirect.port = 443
|
80
85
|
config.elb.redirect.protocol = "HTTPS"
|
86
|
+
config.elb.scheme = "internet-facing"
|
81
87
|
config.elb.ssl = ActiveSupport::OrderedOptions.new
|
82
88
|
config.elb.ssl.certificates = nil
|
83
89
|
config.elb.ssl.enabled = false
|
@@ -41,7 +41,6 @@ module Ufo::TaskDefinition::Helpers::Vars
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def show_layers(paths)
|
44
|
-
label = @ext.sub('.','').capitalize
|
45
44
|
paths.each do |path|
|
46
45
|
if ENV['UFO_LAYERS_ALL']
|
47
46
|
logger.info " #{path}"
|
@@ -85,12 +84,20 @@ module Ufo::TaskDefinition::Helpers::Vars
|
|
85
84
|
value = item.delete(:value)
|
86
85
|
arn = normalize_to_arn(item[:name], value)
|
87
86
|
value = expansion(arn)
|
88
|
-
value = value
|
87
|
+
value = autofix(value)
|
89
88
|
item[:valueFrom] = value
|
90
89
|
end
|
91
90
|
secrets
|
92
91
|
end
|
93
92
|
|
93
|
+
def autofix(value)
|
94
|
+
value = value.sub('parameter//','parameter/') # auto fix accidental leading slash for user
|
95
|
+
if value.include?(':secret:') && value.count(':') == 7 # missing trailing ::
|
96
|
+
value += "::"
|
97
|
+
end
|
98
|
+
value
|
99
|
+
end
|
100
|
+
|
94
101
|
def normalize_to_arn(name, value)
|
95
102
|
case value
|
96
103
|
when /^ssm:/i
|
data/lib/ufo/version.rb
CHANGED
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
|
+
version: 6.3.10
|
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-
|
11
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-logs
|
@@ -564,6 +564,7 @@ files:
|
|
564
564
|
- lib/ufo/cli/help/init.md
|
565
565
|
- lib/ufo/cli/help/logs.md
|
566
566
|
- lib/ufo/cli/help/new/boot_hook.md
|
567
|
+
- lib/ufo/cli/help/new/env_file.md
|
567
568
|
- lib/ufo/cli/help/new/hook.md
|
568
569
|
- lib/ufo/cli/help/ps.md
|
569
570
|
- lib/ufo/cli/help/releases.md
|