aws-sdk-utils 0.0.10 → 0.0.11

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
  SHA1:
3
- metadata.gz: bf0e2d8968beac87bf54fde28c050e01571bd83a
4
- data.tar.gz: 97b74d87594352024825482be9b1a8912ed09f83
3
+ metadata.gz: 15b2c2beb81ba7c31ebeaeb2fc223e600a75de17
4
+ data.tar.gz: 53398c7ad21887a10008e9e0c4250052a4d08390
5
5
  SHA512:
6
- metadata.gz: d361dc7f4864848d056ed204e1ee92b52911f8e4df7c042bfe11b974939cd6957cb08cd29d19f23f410bf4f0166bed3dbc15f9783999ce23237eb88feab17615
7
- data.tar.gz: 29fe26d38a353ad7e512991edb342260f15a43f2c995772ba6137e2c8fed597fcbd5279aeea2892afbea07e33e1c9f2ba2d66d6e645d69a3e31c99fa9eb56117
6
+ metadata.gz: ca63b8e5f925bf23f46282a7ee227227cc088588a8deaf2cf3977a66b7d1fb69d78706aa765c73be77173cd5fa3bf44db2c88efde73964ff126e8df27177df95
7
+ data.tar.gz: 197054d29befe50b2c55e267c4a03356fbfdd1a79aab78778bef4a9494c78e67c97d3dad8d5ea65e2656b2725e9fc8fc5c003e326bf28b2b46dd025b0526dad3
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+ require 'trollop'
3
+ require 'cfndsl_converger'
4
+ require 'yaml'
5
+
6
+ opts = Trollop::options do
7
+ opt :path_to_stacks, '', type: :strings, required: true
8
+ opt :stack_names, '', type: :strings, required: true
9
+ opt :path_to_yaml, '', type: :string, required: false
10
+ end
11
+
12
+ Trollop::die :stack_names, 'path-to-stacks and stack-names need to line up in parallel' unless opts[:path_to_stacks].length == opts[:stack_names].length
13
+
14
+ bindings = opts[:path_to_yaml].nil? ? nil : YAML.load_file(opts[:path_to_yaml])
15
+
16
+ begin
17
+ cfndsl_stacks = []
18
+ opts[:path_to_stacks].each_with_index do |path_to_stack, index|
19
+ cfndsl_stacks << {
20
+ stack_name: opts[:stack_names][index],
21
+ path_to_stack: path_to_stack
22
+ }
23
+ end
24
+
25
+ outputs = CfndslConverger.new.chain_converge(cfndsl_stacks: cfndsl_stacks,
26
+ input_bindings: bindings)
27
+
28
+ puts outputs.to_yaml
29
+ rescue Exception => e
30
+ puts e.message
31
+ exit 1
32
+ end
33
+
@@ -12,7 +12,7 @@ class CfndslConverger
12
12
  cfndsl_stacks.each do |cfndsl_stack|
13
13
  previous_output_bindings = converge stack_name: cfndsl_stack[:stack_name],
14
14
  path_to_stack: cfndsl_stack[:path_to_stack],
15
- bindings: previous_output_bindings
15
+ bindings: previous_output_bindings.merge(input_bindings)
16
16
  end
17
17
  previous_output_bindings
18
18
  end
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.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - someguy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -57,9 +57,11 @@ email:
57
57
  executables:
58
58
  - cfndsl_converge
59
59
  - yaml_get
60
+ - cfndsl_chain_converge
60
61
  extensions: []
61
62
  extra_rdoc_files: []
62
63
  files:
64
+ - bin/cfndsl_chain_converge
63
65
  - bin/cfndsl_converge
64
66
  - bin/yaml_get
65
67
  - lib/aws-sdk-utils.rb