Class: Stackster::StackCreater

Inherits:
Object
  • Object
show all
Defined in:
lib/stackster/stack/stack_creater.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ StackCreater

Returns a new instance of StackCreater.



6
7
8
9
10
11
12
# File 'lib/stackster/stack/stack_creater.rb', line 6

def initialize(args)
  @config = args[:config]
  @logger = @config.logger
  @entry = args[:entry]
  @name = args[:name]
  @template = read_template_from_file args[:template_file]
end

Instance Method Details

#createObject



14
15
16
17
18
19
# File 'lib/stackster/stack/stack_creater.rb', line 14

def create
  @logger.info "Creating Cloud Formation stack #{@name}."
  cloud_formation.create :name => @name,
                         :parameters => read_parameters_from_entry,
                         :template => @template
end