terraform.aws-baseline-infra/modules/ManagementGovernance/Monitoring.ALB/list-alb-targetgroups.sh

7 lines
268 B
Bash
Raw Normal View History

#!/bin/bash
eval "$(jq -r '@sh "lb=\(.lb)"')"
RESULTS=$(aws elbv2 describe-target-groups --load-balancer-arn $lb --query TargetGroups[*].TargetGroupArn --output text --no-cli-pager | sed 's/\t/\n/g' | sort | xargs)
jq -n --arg result "$RESULTS" '{"result":$result}'