-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add istio ingress lb to outputs for use in dns creation
- Loading branch information
Showing
3 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
| # Script to get Load Balancer DNS Name based on the tag Name | ||
|
|
||
| LB_NAME=$1 | ||
|
|
||
| lb_arn=$(for i in $(aws elbv2 describe-load-balancers --query 'LoadBalancers[].LoadBalancerArn' --output text); \ | ||
| do aws elbv2 describe-tags --resource-arns "$i" --query "TagDescriptions[?Tags[?Key=='Name' &&Value=='$LB_NAME']].ResourceArn" --output text ;done) | ||
|
|
||
| if [ -z "$lb_arn" ]; then | ||
| lb_arn="no_arn_exists_for_this_lb_name" | ||
| fi | ||
|
|
||
| dns_name=$(aws elbv2 describe-load-balancers --load-balancer-arns $lb_arn --query 'LoadBalancers[].DNSName' --output text) | ||
|
|
||
| jq -n --arg dnsName "$dns_name" '{"dnsName":$dnsName}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters