lib/vagrant-lightsail/action/terminate_instance.rb
def call(env)
          env[:ui].info(I18n.t('vagrant_lightsail.terminating'))
          begin
            env[:lightsail_client].delete_instance(instance_name: env[:machine].id)
          rescue Aws::Lightsail::Errors => e
            raise Errors::LightailError, message: e
          end

          env[:machine].id = nil

          @app.call(env)
        end
# Destroy the server and remove the tracking ID
Destroy the server and remove the tracking ID
Destroy the server and remove the tracking ID
def call(env)
          env[:ui].info(I18n.t('vagrant_lightsail.terminating'))
          begin
            env[:lightsail_client].delete_instance(instance_name: env[:machine].id)
          rescue Aws::Lightsail::Errors => e
            raise Errors::LightailError, message: e
          end
          env[:machine].id = nil
          @app.call(env)
        end
def call ( env ) env [ :ui ] . info ( I18n . t ( 'vagrant_lightsail.terminating' ) ) begin env [ :lightsail_client ] . delete_instance ( instance_name : env [ :machine ] . id ) rescue Aws :: Lightsail :: Errors => e raise Errors :: LightailError , message : e end env [ :machine ] . id = nil @app . call ( env ) end
Destroy the server and remove the tracking ID
Destroy the server and remove the tracking ID
env