protected function execute(InputInterface $input, OutputInterface $output)
{
if (!$input->getOption('force')) {
throw new \Exception('Operation aborted (use --force)');
}
$instance = $input->getArgument('instance');
$repository = new Repository();
$instance = $repository->findEc2Instance($instance);
if (!$instance instanceof Instance) {
throw new \Exception('Could not find instance');
}
$instance->terminate();
$output->writeln('Terminating instance: ' . $instance->getInstanceId());
return 0;
}