lono 5.3.0 → 5.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/lono/cfn/preview/param.rb +23 -13
- data/lib/lono/output_template.rb +2 -2
- data/lib/lono/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab8f59278665a11fa19fb70dfbb8959271156d79cede05f67acd56ef12b7b8c5
|
4
|
+
data.tar.gz: 640cc60f99dc42503b7f583384fc2700ea12ce720cf76f1e6203ef05ba753e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27cf1a8a766adf340f9c57c68b4d0870037c53bd281c4fe444923a4df5727dc994773b98f2ded35982a432eaf8a70b6072a84dbd61ea529f86c5b6ad8b06062e
|
7
|
+
data.tar.gz: 944c85c1bb31cc3e1fd0682934aeb4302d85b1c832b0450ca3211901e00173f53d268f5746a3abd4324d86ebee0b81dd698cfbe4e02e94b6def8d0b027787575
|
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
|
+
## [5.3.1]
|
7
|
+
- #10 fixes for param diff preview: Ignore noecho parameters
|
8
|
+
|
6
9
|
## [5.3.0]
|
7
10
|
- #8 param preview feature. 3rd type of preview.
|
8
11
|
- #9 ssm helper support in configs
|
@@ -15,28 +15,38 @@ module Lono::Cfn::Preview
|
|
15
15
|
return
|
16
16
|
end
|
17
17
|
|
18
|
-
params = generate_all
|
19
|
-
write_to_tmp(new_path, params)
|
20
18
|
write_to_tmp(existing_path, existing_parameters)
|
19
|
+
write_to_tmp(new_path, new_parameters)
|
21
20
|
|
22
21
|
show_diff(existing_path, new_path)
|
23
22
|
end
|
24
23
|
|
24
|
+
def new_parameters
|
25
|
+
params = generate_all
|
26
|
+
params.reject { |p| ignore_parameters.include?(p[:parameter_key]) }
|
27
|
+
end
|
28
|
+
|
25
29
|
def existing_parameters
|
26
|
-
|
27
|
-
|
28
|
-
|
30
|
+
existing = stack_parameters
|
31
|
+
existing = existing.reject { |p| ignore_parameters.include?(p.parameter_key) }
|
32
|
+
convert_to_cfn_format(existing)
|
33
|
+
end
|
29
34
|
|
35
|
+
def ignore_parameters
|
30
36
|
# Remove optional parameters if they match already. Produces better diff.
|
31
|
-
optional = optional_parameters.map
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
optional = optional_parameters.map { |logical_id, attributes| logical_id }
|
38
|
+
noecho = stack_parameters.select { |p| p.parameter_value == '****' }
|
39
|
+
noecho = noecho.map { |p| p.parameter_key }
|
40
|
+
optional + noecho
|
41
|
+
end
|
42
|
+
memoize :ignore_parameters
|
43
|
+
|
44
|
+
def stack_parameters
|
45
|
+
resp = cfn.describe_stacks(stack_name: @stack_name)
|
46
|
+
stack = resp.stacks.first
|
47
|
+
stack.parameters
|
39
48
|
end
|
49
|
+
memoize :stack_parameters
|
40
50
|
|
41
51
|
private
|
42
52
|
def output_template
|
data/lib/lono/output_template.rb
CHANGED
@@ -20,11 +20,11 @@ module Lono
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def required_parameters
|
23
|
-
parameters.reject { |logical_id, p| p["Default"] }
|
23
|
+
parameters.reject { |logical_id, p| p["Default"].nil? }
|
24
24
|
end
|
25
25
|
|
26
26
|
def optional_parameters
|
27
|
-
parameters.select { |logical_id, p| p["Default"] }
|
27
|
+
parameters.select { |logical_id, p| !p["Default"].nil? }
|
28
28
|
end
|
29
29
|
|
30
30
|
def parameters
|
data/lib/lono/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lono
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|