saltstack/salt — pull request #10661 by bretep (2014-02-22 00:08:49+00:00)
Title: Ability to destroy instances matching a profile

There exists times when there may be multiple providers for a single
region. For example in ec2 you might have a provider for each region.
When salt-cloud runs get_running_by_names it will return runnung
instances for each provider. The ec2 provider returns all running
instances for the entire region, thus the same instance will return
for each avaliability zone. Once salt-cloud destroys this instance
it will thrown an exception when it tries again.

The logic is, if you can specify a profile when creating, why not
when destroying?

Example:

```bash
root@localhost:~# salt-cloud example1234 -d
[INFO ] salt-cloud starting
The following virtual machines are set to be destroyed:
us-west-2b-devops:
ec2:
example1234
us-west-2b-dev:
ec2:
example1234
us-west-2a-dev:
ec2:
example1234
us-west-2a-devops:
ec2:
example1234
```

After this fix:

```bash
root@localhost:~# salt-cloud -p usw2a-dev-web example1234 -d
[INFO ] salt-cloud starting
The following virtual machines are set to be destroyed:
us-west-2a-dev:
ec2:
example1234
```