Class: Lono::Sets::Create

Inherits:
Base show all
Defined in:
lib/lono/sets/create.rb

Instance Method Summary collapse

Methods inherited from Base

#build_options, #exit_unless_updatable!, #initialize, #operation_preferences, #run

Methods inherited from Cfn::Base

#capabilities, #command_with_iam, #continue_update_rollback, #continue_update_rollback_sure?, #delete_rollback_stack, #exit_unless_updatable!, #generate_all, #notification_arns, #pretty_path, #prompt_for_iam, #quit, #rerun_with_iam?, #run, #set_template_url!, #show_options, #stack_status, #starting_message, #status, #tags

Methods included from Utils::Sure

#sure?

Methods included from AwsServices

#cfn, #ec2, #iam, #s3, #s3_presigner, #s3_resource, #sts

Methods included from AwsServices::Helper

#rollback_complete?, #testing_update?

Methods included from AwsServices::StackSet

#find_stack_set, #stack_set_exists?

Methods included from AwsServices::Stack

#find_stack, #stack_exists?

Methods inherited from AbstractBase

#initialize, #reinitialize, #template_path

Methods included from Blueprint::Root

#find_blueprint_root, #set_blueprint_root

Constructor Details

This class inherits a constructor from Lono::Sets::Base

Instance Method Details

#saveObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/lono/sets/create.rb', line 3

def save
  message = "Creating #{@stack.color(:green)} stack set."
  if @options[:noop]
    puts "NOOP #{message}"
    return
  end

  if stack_set_exists?(@stack)
    puts "Cannot create #{@stack.color(:green)} stack set because it already exists.".color(:red)
    return
  end

  unless File.exist?(template_path)
    puts "Cannot create #{@stack.color(:green)} template not found: #{template_path}."
    return
  end

  options = build_options
  show_options(options, "cfn.create_stack_set")
  cfn.create_stack_set(options) # resp.stack_set_id => String. There is no resp.operation_id
  puts message unless @options[:mute]
  true # There is no resp.operation_id
end