knife-cloudformation 0.2.18 → 0.2.20
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/knife-cloudformation/knife/stack.rb +19 -0
- data/lib/knife-cloudformation/version.rb +1 -1
- 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: 326003160f1b48c7de720a1da9ee667eda87b81f
|
4
|
+
data.tar.gz: 9cff2c4605bde31f4c0031bfa427e47fe98d38c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57a4fabcc6df675693324507be22e4cdba4ea93b0dc20c0e574c76a00b5bbe6f238162c1380a3275138416a15ba672f3df4a3ec3d30e9ff8268fc6576e7aafc5
|
7
|
+
data.tar.gz: af8da2c98e8913a00d03360d978a571cd3933d57637f04edbfa25f7fc7de578572b31cc598bbd39cd6ab8dcb7db929eab1cae0c4056d428546078df7800c7803
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|