class Stackit::StackCli

Attributes

notifier[RW]

Public Class Methods

new(*args) click to toggle source
Calls superclass method Stackit::BaseCli::new
# File lib/stackit/cli/stack_cli.rb, line 10
def initialize(*args)
  super(*args)
  self.notifier = Stackit::ThorNotifier.new(*args)
end

Public Instance Methods

create_stack() click to toggle source
# File lib/stackit/cli/stack_cli.rb, line 27
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() click to toggle source
# File lib/stackit/cli/stack_cli.rb, line 78
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() click to toggle source
# File lib/stackit/cli/stack_cli.rb, line 56
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