Class: StackMaster::Commands::Apply

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Commander::UI, StackMaster::Command, Prompter
Defined in:
lib/stack_master/commands/apply.rb

Constant Summary collapse

TEMPLATE_TOO_LARGE_ERROR_MESSAGE =
'The (space compressed) stack is larger than the limit set by AWS. See http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html'.freeze

Instance Method Summary collapse

Methods included from Prompter

#ask?

Methods included from StackMaster::Command

included, #success?

Constructor Details

#initialize(config, stack_definition, options = Commander::Command::Options.new) ⇒ Apply

Returns a new instance of Apply.



9
10
11
12
13
14
15
16
# File 'lib/stack_master/commands/apply.rb', line 9

def initialize(config, stack_definition, options = Commander::Command::Options.new)
  @config = config
  @s3_config = stack_definition.s3
  @stack_definition = stack_definition
  @from_time = Time.now
  @options = options
  @options.on_failure ||= "ROLLBACK"
end

Instance Method Details

#performObject



18
19
20
21
22
23
24
# File 'lib/stack_master/commands/apply.rb', line 18

def perform
  diff_stacks
  ensure_valid_parameters!
  ensure_valid_template_body_size!
  create_or_update_stack
  tail_stack_events
end