knife-cloudformation 0.2.18 → 0.2.20

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
  SHA1:
3
- metadata.gz: 677c87eed9a6f47f2a1d64292f4a8950afa75cf9
4
- data.tar.gz: 381c7d8d90d90be1972a9bfa3dc1571fd82fef81
3
+ metadata.gz: 326003160f1b48c7de720a1da9ee667eda87b81f
4
+ data.tar.gz: 9cff2c4605bde31f4c0031bfa427e47fe98d38c5
5
5
  SHA512:
6
- metadata.gz: 8377709a7c24992e5aad34313ae2735501f24e2c1cfadfff8e31b410aa6efbf48c8cecace55ee30a7718043dac369bb2ac9e42e7077bffa8dfbde2e3028ad902
7
- data.tar.gz: a71a840ba3c95ace1b1a0a6887a20bb067d94f0d7c48c61b2a94f25f3a8eb0b4f150f1094932b836b1e71456de37c73c349846285e718405c78fd76f2d9dd126
6
+ metadata.gz: 57a4fabcc6df675693324507be22e4cdba4ea93b0dc20c0e574c76a00b5bbe6f238162c1380a3275138416a15ba672f3df4a3ec3d30e9ff8268fc6576e7aafc5
7
+ data.tar.gz: af8da2c98e8913a00d03360d978a571cd3933d57637f04edbfa25f7fc7de578572b31cc598bbd39cd6ab8dcb7db929eab1cae0c4056d428546078df7800c7803
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.2.20
2
+ * Add automatic support for outputs in nested stacks to `--apply-stack`
3
+
1
4
  ## v0.2.18
2
5
  * Fix nested stack URL generation
3
6
 
@@ -23,6 +23,7 @@ module KnifeCloudformation
23
23
  fetch(action, {}).fetch(:apply_stacks, [])
24
24
  remote_stacks.each do |stack_name|
25
25
  remote_stack = provider.connection.stacks.get(stack_name)
26
+ apply_nested_stacks!(remote_stack, stack)
26
27
  if(remote_stack)
27
28
  stack.apply_stack(remote_stack)
28
29
  else
@@ -32,6 +33,24 @@ module KnifeCloudformation
32
33
  stack
33
34
  end
34
35
 
36
+ # Detect nested stacks and apply
37
+ #
38
+ # @param remote_stack [Miasma::Models::Orchestration::Stack] nested stack
39
+ # @param stack [Miasma::Models::Orchestration::Stack] current stack
40
+ # @return [Miasma::Models::Orchestration::Stack]
41
+ # @todo ported from a proto branch and needs to be refactored.
42
+ # this implementation is some what shady
43
+ def apply_nested_stacks!(remote_stack, stack)
44
+ remote_stack.resources.all.each do |resource|
45
+ if(resource.type == 'AWS::CloudFormation::Stack')
46
+ nested_stack = provider.connection.stacks.get(resource.id)
47
+ apply_nested_stacks!(nested_stack, stack)
48
+ stack.apply_stack(nested_stack)
49
+ end
50
+ end
51
+ stack
52
+ end
53
+
35
54
  # Apply all stacks from an unpacked stack
36
55
  #
37
56
  # @param stack_name [String] name of parent stack
@@ -1,4 +1,4 @@
1
1
  module KnifeCloudformation
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.2.18')
3
+ VERSION = Gem::Version.new('0.2.20')
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-cloudformation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.18
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef