module Idlc::Deploy::Power

def stop_instance(instance, async=false)

def stop_instance(instance, async=false)
  raise InstanceKeepAlive if keep_alive?(instance.tags)
  msg("Stopping Instance (#{instance.id})...")
  instance.stop(
    dry_run: false
  )
  unless async
    obj = instance.wait_until_stopped
    msg('Stopped Instance: ' + get_name(obj.tags))
  end
end