Class: SimpleDeploy::AWS::InstanceReader

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_deploy/aws/instance_reader.rb

Instance Method Summary collapse

Constructor Details

#initializeInstanceReader

Returns a new instance of InstanceReader.



4
5
6
# File 'lib/simple_deploy/aws/instance_reader.rb', line 4

def initialize
  @config  = SimpleDeploy.config
end

Instance Method Details

#list_stack_instances(stack_name) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/simple_deploy/aws/instance_reader.rb', line 8

def list_stack_instances(stack_name)
  asg_id = auto_scaling_group_id(stack_name)
  return [] unless asg_id

  asg_instances = list_instances asg_id
  return [] unless asg_instances.any?

  describe_instances asg_instances
end