class Outliers::Resources::Aws::Ec2::Instance

Public Class Methods

key() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 6
def self.key
  'instance_id'
end

Public Instance Methods

classic?() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 10
def classic?
  !vpc?
end
running?() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 14
def running?
  logger.debug "Verifying '#{status}' equals 'running'."
  status == :running
end
source_dest_check?() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 19
def source_dest_check?
  unless vpc?
    logger.debug "Instance must be in a VPC to validate source_dest_check. Returning false."
    return false
  end
  source_dest_check == true
end
valid_image_id?(args) click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 27
def valid_image_id?(args)
  image_ids = Array(args)

  logger.debug "Verifying Image ID '#{image_id}' is one of '#{image_ids.join(', ')}'."
  image_ids.include? image_id
end
vpc?() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 34
def vpc?
  !source.vpc_id.nil?
end

Private Instance Methods

image_id() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 44
def image_id
  @image_id ||= source.image_id
end
instance_type() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 48
def instance_type
  @instance_type ||= source.instance_type
end
source_dest_check() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 52
def source_dest_check
  @source_dest_check ||= source.source_dest_check
end
tags() click to toggle source
# File lib/outliers/resources/aws/ec2/instance.rb, line 40
def tags
  @tags ||= source.tags
end