Method: Ftl::Client#terminate

Defined in:
lib/ftl/client.rb

#terminate(args = {}) ⇒ Object Also known as: t



180
181
182
183
184
185
186
187
188
189
190
# File 'lib/ftl/client.rb', line 180

def terminate(args={})
  guard(on_what, "Please provide the name (or partial name for the instance(s) you want to terminate. For instance, like: ftl destroy ninja")
  display "Spinning down FTL..."
  instances = find_instances(on_what)
  if !instances.empty?
    instances.map(&:destroy)
    display "Destroyed [bold]\[#{instances.map(&:id).join(', ')}\][/]"
  else
    display "No instances found"
  end
end