lib/kontena/machine/aws/node_destroyer.rb in kontena-cli-0.11.7 vs lib/kontena/machine/aws/node_destroyer.rb in kontena-cli-0.12.0
- old
+ new
@@ -15,10 +15,10 @@
@api_client = api_client
@client = Fog::Compute.new(:provider => 'AWS', :aws_access_key_id => access_key_id, :aws_secret_access_key => secret_key, :region => region)
end
def run!(grid, name)
- instance = client.servers.all({'tag:kontena_name' => name}).first
+ instance = client.servers.all({'tag:Name' => name}).first
if instance
ShellSpinner "Terminating AWS instance #{name.colorize(:cyan)} " do
instance.destroy
sleep 2 until client.servers.get(instance.id).state == 'terminated'
end