terraform.aws-baseline-infra/modules/util/resource-list/list-asg.sh

7 lines
259 B
Bash
Raw Normal View History

#!/bin/bash
# exclude ASG instances
RESULTS=$(aws autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[*].AutoScalingGroupName' --output text --no-cli-pager | sed 's/\t/\n/g' | sort | xargs)
jq -n --arg result "$RESULTS" '{"result":$result}'