Skip to content

Commit

Permalink
fix iteration for ec2 instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Wenzel committed Mar 30, 2020
1 parent e65740c commit b83762e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#### Currently it takes only privateIpAddress, this can be changed to a non privateIpAddress

#### [ {"PrivateIpAddress": "", "Tags": [{"Key": "", "Value": ""}] } ]
instances=$(aws ec2 describe-instances --filters 'Name=tag-key,Values=prom/scrape*' --query "Reservations[*].Instances[*].{PrivateIpAddress:PrivateIpAddress,Tags:Tags}" --output json | jq '.[0] // []')
instances=$(aws ec2 describe-instances --filters 'Name=tag-key,Values=prom/scrape*' --query "Reservations[*].Instances[*].{PrivateIpAddress:PrivateIpAddress,Tags:Tags}" --output json | jq 'flatten // []')

fileSdConfig="[]"

Expand Down

0 comments on commit b83762e

Please sign in to comment.