stackit 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stackit/stack/managed_stack.rb +8 -7
- data/lib/stackit/stack/managed_stack_service.rb +6 -3
- data/lib/stackit/stack.rb +1 -1
- data/lib/stackit/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: 2377e14f70d1702952ef7978585e929fc40e3c78
|
4
|
+
data.tar.gz: 1a5f3f05d472161b4c935f8b5e19e395da6c4e39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1630a4ec8a5da72b513fa1036a05cda0a955f4953c6dc6be838c0abba3a386675d0304129b146ddd4f46f30214d64384b7714ed3b5134910760600fbe62d0ecf
|
7
|
+
data.tar.gz: be2b35681a4fe8ed567ffbdac24a3a266a3907bbadb569db500d8dae9b38e76d359ad53b47a86f0889f4f312ada1740b1ef3224f20e91a74b9c1c7bd0b1f0007
|
@@ -200,6 +200,7 @@ module Stackit
|
|
200
200
|
|
201
201
|
def parse_file_parameters(parameters_file)
|
202
202
|
if File.exist?(parameters_file)
|
203
|
+
Stackit.logger.info "Parsing cloudformation parameters file: #{parameters_file}"
|
203
204
|
@file_parameters = {}
|
204
205
|
file_params = JSON.parse(File.read(parameters_file))
|
205
206
|
file_params.inject(@file_parameters) do |hash, param|
|
@@ -239,15 +240,16 @@ module Stackit
|
|
239
240
|
def create_cloudformation_options(action)
|
240
241
|
case action
|
241
242
|
when :create_stack
|
242
|
-
|
243
|
+
create_stack_request_params.merge(
|
243
244
|
parameters: to_request_parameters(merged_parameters),
|
244
245
|
capabilities: capabilities
|
245
|
-
|
246
|
+
)
|
246
247
|
when :update_stack
|
247
|
-
|
248
|
+
update_stack_request_params.merge(
|
248
249
|
parameters: to_request_parameters(merged_parameters),
|
249
|
-
capabilities: capabilities
|
250
|
-
|
250
|
+
capabilities: capabilities,
|
251
|
+
use_previous_template: template.options[:template_body].nil? && template.options[:template_url].nil?
|
252
|
+
)
|
251
253
|
else
|
252
254
|
delete_stack_request_params
|
253
255
|
end
|
@@ -255,9 +257,8 @@ module Stackit
|
|
255
257
|
|
256
258
|
def merged_parameters
|
257
259
|
merged_params = template.parsed_parameters
|
258
|
-
return parsed_parameters unless depends.length
|
259
260
|
merged_params.merge!(file_parameters) if file_parameters
|
260
|
-
depends.each do |dependent_stack_name|
|
261
|
+
depends.each do |dependent_stack_name|
|
261
262
|
this_stack = Stack.new({
|
262
263
|
cloudformation: cloudformation,
|
263
264
|
stack_name: dependent_stack_name
|
@@ -48,15 +48,18 @@ module Stackit
|
|
48
48
|
protected
|
49
49
|
|
50
50
|
def stack_name
|
51
|
-
return options[:stack_name] ||
|
51
|
+
return options[:stack_name] ||
|
52
|
+
"#{Stackit.environment}-#{options[:stack_name]}"
|
52
53
|
end
|
53
54
|
|
54
55
|
def template
|
55
|
-
return options[:template] ||
|
56
|
+
return options[:template] ||
|
57
|
+
File.expand_path("#{options[:stack_name]}.json", template_dir)
|
56
58
|
end
|
57
59
|
|
58
60
|
def parameters_file
|
59
|
-
return options[:parameters_file ||
|
61
|
+
return options[:parameters_file] ||
|
62
|
+
File.expand_path("#{options[:stack_name]}.parameters", template_dir)
|
60
63
|
end
|
61
64
|
|
62
65
|
def parameter_mappings
|
data/lib/stackit/stack.rb
CHANGED
@@ -32,7 +32,7 @@ module Stackit
|
|
32
32
|
@capabilities = options[:capabilities]
|
33
33
|
@tags = options[:tags]
|
34
34
|
@on_failure = options[:on_failure]
|
35
|
-
@use_previous_template = options[:use_previous_template]
|
35
|
+
@use_previous_template = options[:use_previous_template]
|
36
36
|
@retain_resources = options[:retain_resources]
|
37
37
|
end
|
38
38
|
|
data/lib/stackit/version.rb
CHANGED