Class: Stackit::StackCli
Instance Method Summary
collapse
Methods inherited from BaseCli
banner, exit_on_failure?, subcommand_prefix
Constructor Details
#initialize(*args) ⇒ StackCli
Returns a new instance of StackCli.
8
9
10
|
# File 'lib/stackit/cli/stack_cli.rb', line 8
def initialize(*args)
super(*args)
end
|
Instance Method Details
#create_stack ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/stackit/cli/stack_cli.rb', line 24
def create_stack
ManagedStack.new({
template: options[:template],
stack_name: options[:stack_name],
stack_policy: options[:stack_policy],
depends: options[:depends],
user_defined_parameters: options[:parameters],
parameters_file: options[:parameters_file],
parameter_map: options[:parameter_map],
wait: options[:wait],
force: options[:force],
dry_run: options[:dry_run],
debug: !!options[:debug]
}).create!
end
|
#delete_stack ⇒ Object
75
76
77
78
79
80
81
82
|
# File 'lib/stackit/cli/stack_cli.rb', line 75
def delete_stack
ManagedStack.new({
stack_name: options[:stack_name],
wait: options[:wait],
dry_run: options[:dry_run],
debug: !!options[:debug]
}).delete!
end
|
#update_stack ⇒ Object
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/stackit/cli/stack_cli.rb', line 53
def update_stack
ManagedStack.new({
template: options[:template],
stack_name: options[:stack_name],
stack_policy: options[:stack_policy],
stack_policy_during_update: options[:stack_policy_during_update],
depends: options[:depends],
user_defined_parameters: options[:parameters],
parameters_file: options[:parameters_file],
parameter_map: options[:parameter_map],
wait: options[:wait],
force: options[:force],
dry_run: options[:dry_run],
debug: !!options[:debug]
}).update!
end
|