Class: Soror::EC2::Instance
- Inherits:
-
Object
- Object
- Soror::EC2::Instance
- Extended by:
- Soror::EC2
- Defined in:
- lib/soror/ec2/instance.rb
Class Method Summary collapse
Methods included from Soror::EC2
Class Method Details
.search_by(tags) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/soror/ec2/instance.rb', line 7 def search_by() filters = [].tap do |array| array << { name: 'instance-state-name', values: ['running'] } .each do |k, v| array << { name: "tag:#{k}", values: [v] } end end resource.instances(filters: filters).to_a end |