aws-sdk-utils 0.0.20 → 0.0.21
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/lib/cloudformation_converger.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d3356f8af3803605f053ee96b0fbcc32dc1fb95
|
4
|
+
data.tar.gz: b0c7eab1be4c282ec78f7df784930c44a0c3b16f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1041f35b9ec11b441385b1976bbc34ee361e23b1d751ce4e8871b62385f99c036a9a8d007aa9069eba9f2d1c32109b645852606764640e8e8f6efc943d18a5fd
|
7
|
+
data.tar.gz: 4e6e9a3278984c688a6d99d3c1cd107c64c803914689c40a3bdeb1bc04ebd4328ab8daf765cc37b3795c0e3a6830e5168803d52d3cad7ccc2e831d8cee6a2968
|
@@ -3,6 +3,26 @@ require 'yaml'
|
|
3
3
|
|
4
4
|
class CloudFormationConverger
|
5
5
|
|
6
|
+
def chain_converge(cloudformation_stacks:,
|
7
|
+
input_bindings: nil,
|
8
|
+
strip_extras: false)
|
9
|
+
|
10
|
+
all_output_bindings = []
|
11
|
+
previous_output_bindings = input_bindings
|
12
|
+
cloudformation_stacks.each do |cloudformation_stack|
|
13
|
+
previous_output_bindings = converge stack_name: cloudformation_stack[:stack_name],
|
14
|
+
stack_path: cloudformation_stack[:path_to_stack],
|
15
|
+
bindings: previous_output_bindings,
|
16
|
+
strip_extras: strip_extras
|
17
|
+
all_output_bindings << previous_output_bindings
|
18
|
+
end
|
19
|
+
all_output_bindings.inject({}) do |merged_output_bindings, per_stack_output_binding|
|
20
|
+
merged_output_bindings.merge(per_stack_output_binding) do |key, oldval, newval|
|
21
|
+
STDERR.puts "duplicate value for #{key}: #{oldval} and #{newval}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
6
26
|
def converge(stack_name:,
|
7
27
|
stack_path:,
|
8
28
|
bindings: nil,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- someguy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|