cloudformation-tool 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloud_formation_tool/cloud_formation/stack.rb +12 -12
- data/lib/cloud_formation_tool/version.rb +1 -1
- 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: d5d93b26ffa33f9856b2765bb6a586ddf64cd3aa
|
4
|
+
data.tar.gz: 96824fdca328199cb6ab9d49d4f20bc5afd16551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a734f138489a48d96cdb1e3be04014b45b02b8ff8b77463292cec8ffe251956563bf01bc172d9ce7d04304458ab53d81412a667ecdf589ede2b0cbe45baa2b7
|
7
|
+
data.tar.gz: 27eff5a31ed8c64fe7c4c48f783e1e77f3766df6267123feef02b07ac8505d061709e72e67942f16ba9d63e9dfe432eb0ba0c77b2f39d2bc6b9b28e182c92523
|
@@ -29,7 +29,7 @@ module CloudFormationTool
|
|
29
29
|
|
30
30
|
def update(url, filepath, params = {})
|
31
31
|
log "Updating existing stack '#{name}' from '#{filepath}' params #{params.inspect}"
|
32
|
-
|
32
|
+
valid_check do
|
33
33
|
resp = awscf.update_stack({
|
34
34
|
stack_name: @name,
|
35
35
|
template_url: url,
|
@@ -51,7 +51,7 @@ module CloudFormationTool
|
|
51
51
|
url = upload(make_filename('yaml'), @template, gzip: false)
|
52
52
|
return update(url, template, params) if exist?
|
53
53
|
log "Creating stack '#{name}' from '#{template}' params #{params.inspect}"
|
54
|
-
|
54
|
+
valid_check do
|
55
55
|
resp = awscf.create_stack({
|
56
56
|
stack_name: @name,
|
57
57
|
template_url: url,
|
@@ -170,16 +170,16 @@ module CloudFormationTool
|
|
170
170
|
end
|
171
171
|
end
|
172
172
|
end
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
end
|
173
|
+
|
174
|
+
private
|
175
|
+
|
176
|
+
def valid_check
|
177
|
+
begin
|
178
|
+
yield
|
179
|
+
rescue Aws::CloudFormation::Errors::ValidationError => e
|
180
|
+
raise CloudFormationTool::Errors::ValidationError, "Stack validation error: #{e.message}"
|
181
|
+
end
|
182
|
+
end
|
183
183
|
end
|
184
184
|
|
185
185
|
end
|