cloudformation-tool 0.5.5 → 0.5.6
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 +4 -4
- data/bin/cftool +2 -2
- data/lib/cloud_formation_tool/cloud_formation/stack.rb +18 -14
- data/lib/cloud_formation_tool/errors.rb +6 -2
- 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: 48f4c2873d720d299c5ab653cd41fa270c1ccf06
|
4
|
+
data.tar.gz: a4c58902080508b20d01c39b457a73edc50880a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae305dc7980e6a5d53272a14045c6cc5db3f1e917ec7812d39cd9cc75dffb64aa55ca6ff492f0d26251cd69cc992c4cf6bc5f112fcc241f323a92d9ec36f3369
|
7
|
+
data.tar.gz: 6d712ffeb74e9258016b1108532eef0fba4b4be61f8996abcdf13e702c15602a3348619e5317a38008128f4d69914689f6b311cf53d0b72a1d74425676fcfdbc
|
data/bin/cftool
CHANGED
@@ -49,20 +49,24 @@ module CloudFormationTool
|
|
49
49
|
url = upload(make_filename('yaml'), tmpl, gzip: false)
|
50
50
|
return update(url, template, params) if exist?
|
51
51
|
log "Creating stack '#{name}' from '#{template}' params #{params.inspect}"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
52
|
+
begin
|
53
|
+
resp = awscf.create_stack({
|
54
|
+
stack_name: @name,
|
55
|
+
template_url: url,
|
56
|
+
capabilities: %w(CAPABILITY_IAM CAPABILITY_NAMED_IAM),
|
57
|
+
on_failure: "DO_NOTHING", ##"ROLLBACK",
|
58
|
+
parameters: params.collect do |k,v|
|
59
|
+
{
|
60
|
+
parameter_key: k.to_s,
|
61
|
+
parameter_value: v.to_s,
|
62
|
+
use_previous_value: false,
|
63
|
+
}
|
64
|
+
end
|
65
|
+
})
|
66
|
+
resp.stack_id
|
67
|
+
rescue Aws::CloudFormation::Errors::ValidationError => e
|
68
|
+
raise CloudFormationTool::Errors::ValidationError, "Stack validation error: #{e.message}"
|
69
|
+
end
|
66
70
|
end
|
67
71
|
|
68
72
|
def resources
|
@@ -2,10 +2,14 @@ module CloudFormationTool
|
|
2
2
|
module Errors
|
3
3
|
|
4
4
|
Autoloaded.module { }
|
5
|
+
|
6
|
+
class BaseError < StandardError; end
|
5
7
|
|
6
|
-
class AppError <
|
8
|
+
class AppError < BaseError; end
|
7
9
|
|
8
|
-
class
|
10
|
+
class ValidationError < BaseError; end
|
11
|
+
|
12
|
+
class StackDoesNotExistError < BaseError; end
|
9
13
|
|
10
14
|
end
|
11
15
|
end
|