Dont add host if dns is missing
@@ -5,5 +5,6 @@ set -euo pipefail
HAB_ENV=${1}
aws ec2 describe-instances \
- --filter Name=tag:X-Environment,Values=${HAB_ENV} \
+ --filter "Name=tag:X-Environment,Values=${HAB_ENV}" \
+ "Name=instance-state-name,Values=running" \
--region=us-west-2
