aws-sdk-utils 0.0.28 → 0.0.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cfndsl_converger.rb +5 -0
- data/lib/cloudformation_converger.rb +10 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d81381de20fc18a745693dfb93c2e83b09b80c8a
|
4
|
+
data.tar.gz: d310809cbad37bbff4d29492ceb666e2524012d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfcc9bc99ae0e7b50c7d4a83bddd10a58dce675eadde3cc514d71fd50df15584cce472b142ad2dd1ca0249057c6f094a6b04e56f0b8055f1d2ebb52c39eb6675
|
7
|
+
data.tar.gz: b6f3eb451361e3367f9a00cc32062a790528bbad4df254ee4a4608149a0bf908982330187f4ab9e4f7b99ff4e4b4f258577bccfc0a0bbf28fd43b19911f2baaa
|
data/lib/cfndsl_converger.rb
CHANGED
@@ -89,6 +89,7 @@ class CfndslConverger
|
|
89
89
|
rescue Exception => error
|
90
90
|
if error.to_s =~ /No updates are to be performed/
|
91
91
|
STDERR.puts 'no updates necessary'
|
92
|
+
return stack_outputs_hash(stack) if stack.status =~ /COMPLETE/
|
92
93
|
else
|
93
94
|
raise error
|
94
95
|
end
|
@@ -108,6 +109,10 @@ class CfndslConverger
|
|
108
109
|
raise "#{stack_name} failed to converge: #{stack.stack_status}"
|
109
110
|
end
|
110
111
|
|
112
|
+
stack_outputs_hash(stack)
|
113
|
+
end
|
114
|
+
|
115
|
+
def stack_outputs_hash(stack)
|
111
116
|
stack.outputs.inject({}) do |hash, output|
|
112
117
|
hash[output.output_key] = output.output_value
|
113
118
|
hash
|
@@ -48,6 +48,7 @@ class CloudFormationConverger
|
|
48
48
|
rescue Exception => error
|
49
49
|
if error.to_s =~ /No updates are to be performed/
|
50
50
|
STDERR.puts 'no updates necessary'
|
51
|
+
return stack_outputs_hash(stack) if stack.status =~ /COMPLETE/
|
51
52
|
else
|
52
53
|
raise error
|
53
54
|
end
|
@@ -68,10 +69,7 @@ class CloudFormationConverger
|
|
68
69
|
raise "#{stack_name} failed to converge: #{stack.stack_status}"
|
69
70
|
end
|
70
71
|
|
71
|
-
stack
|
72
|
-
hash[output.output_key] = output.output_value
|
73
|
-
hash
|
74
|
-
end
|
72
|
+
stack_outputs_hash(stack)
|
75
73
|
end
|
76
74
|
|
77
75
|
private
|
@@ -99,4 +97,11 @@ class CloudFormationConverger
|
|
99
97
|
end
|
100
98
|
parameters
|
101
99
|
end
|
102
|
-
|
100
|
+
|
101
|
+
def stack_outputs_hash(stack)
|
102
|
+
stack.outputs.inject({}) do |hash, output|
|
103
|
+
hash[output.output_key] = output.output_value
|
104
|
+
hash
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|