def instance_group(group_name)
      config = config_for_group(group_name)

      instance_group = Elasticity::InstanceGroup.new
      instance_group.role = group_name.upcase
      instance_group.type = config['instance_type']

      if config.has_key?('instance_count') && config['instance_count'] > 0
        instance_group.count = config['instance_count']
      end

      if config['use_spot_instances'] == true
        instance_group.set_spot_instances(config['bid_price'])
      end

      instance_group
    end
def instance_group(group_name)
      config = config_for_group(group_name)

      instance_group = Elasticity::InstanceGroup.new
      instance_group.role = group_name.upcase
      instance_group.type = config['instance_type']

      if config.has_key?('instance_count') && config['instance_count'] > 0
        instance_group.count = config['instance_count']
      end

      if config['use_spot_instances'] == true
        instance_group.set_spot_instances(config['bid_price'])
      end

      instance_group
    end
Configures an instance group with the instance type, # of instances and
 the bid price if spot instances are to be used.