Limit elastic IP association to pending, running instances
Limit elastic IP association to pending, running instances

EC2 takes some time to clean up terminated instances. When replacing an instance, elastic association on the new instance often fails because the old instance is still hanging around in a "terminated" state.

This change limits instance lookup to pending or running instances for the purpose of elastic IP association.
gregohardy/puppetlabs-aws,puppetlabs/puppetlabs-aws,gregohardy/puppetlabs-aws,benpillet/puppetlabs-aws,marksyme/puppetlabs-aws,hundredacres/puppetlabs-aws,rfletcher/puppet-aws,daveseff/puppetlabs-aws,zvymazal/puppetlabs-aws,zvymazal/puppetlabs-aws,DavidS/puppetlabs-aws,zleswomp/puppetlabs-aws,hundredacres/puppetlabs-aws,zleswomp/puppetlabs-aws,puppetlabs/puppetlabs-aws,benpillet/puppetlabs-aws,DavidS/puppetlabs-aws,daveseff/puppetlabs-aws,marksyme/puppetlabs-aws,rfletcher/puppet-aws