Sha256: 7bacdd3ed272cd4b667773e5e2ea5f369c536fd2877ef2dd9c71d365608ce1db
Contents?: true
Size: 628 Bytes
Versions: 7
Compression:
Stored size: 628 Bytes
Contents
require "log4r" module VagrantPlugins module AWS module Action # This terminates the running instance. class TerminateInstance def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant_aws::action::terminate_instance") end def call(env) server = env[:aws_compute].servers.get(env[:machine].id) # Destroy the server and remove the tracking ID env[:ui].info(I18n.t("vagrant_aws.terminating")) server.destroy env[:machine].id = nil @app.call(env) end end end end end
Version data entries
7 entries across 7 versions & 3 rubygems