Class: Lono::Sets::Instances::Base

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

Direct Known Subclasses

Delete, Sync

Instance Method Summary collapse

Methods inherited from Base

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

Methods inherited from Cfn::Base

#capabilities, #check_registration, #command_with_iam, #continue_update_rollback, #continue_update_rollback_sure?, #delete_rollback_stack, #exit_unless_updatable!, #generate_all, #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::AbstractBase

Instance Method Details

#accountsObject



17
18
19
# File 'lib/lono/sets/instances/base.rb', line 17

def accounts
  @options[:accounts]
end

#regionsObject



21
22
23
# File 'lib/lono/sets/instances/base.rb', line 21

def regions
  @options[:regions]
end

#requestedObject

Simple structure to help with subtracting logic

[“112233445566”, “us-west-1”], [“112233445566”, “us-west-1”]


5
6
7
8
9
10
11
12
13
14
# File 'lib/lono/sets/instances/base.rb', line 5

def requested
  requested = []
  accounts.each do |a|
    regions.each do |r|
      item = [a,r]
      requested << item
    end
  end
  requested.sort.uniq
end

#stack_instancesObject



25
26
27
28
# File 'lib/lono/sets/instances/base.rb', line 25

def stack_instances
  resp = cfn.list_stack_instances(stack_set_name: @stack)
  resp.summaries
end