Skip to content

Commit

Permalink
Adding debug echos in argocd bootstrap workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
caiocsgomes committed Jun 29, 2024
1 parent 78b9c3a commit 8f700f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/argo-cd-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ jobs:
run: |
## Get the ALB ARN
alb_arn=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} | jq -r '.LoadBalancers[].LoadBalancerArn' | xargs -I {} aws --region ${{ secrets.AWS_REGION }} elbv2 describe-tags --resource-arns {} --query "TagDescriptions[?Tags[?Key=='ingress.k8s.aws/stack' &&Value=='eks-lab-ingress']].ResourceArn" --output text)
echo "ALB ARN: $alb_arn"
## Get the ALB DNS Name
alb_dns=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} --query "LoadBalancers[?LoadBalancerArn=='${alb_arn}'].DNSName" --output text)
echo "ALB DNS: $alb_dns"
## Get hosted zone id
hosted_zone_id=$(aws route53 list-hosted-zones --query "HostedZones[?Name=='caiogomes.me.'].Id" --output text)
echo "Hosted Zone ID: $hosted_zone_id"
## Set the DNS record to the ALB DNS Name
aws route53 change-resource-record-sets --hosted-zone-id $hosted_zone_id --change-batch '{"Changes":[{"Action":"UPSERT","ResourceRecordSet":{"Name":"*.eks.caiogomes.me.","Type":"CNAME","TTL":300,"ResourceRecords":[{"Value":"'${alb_dns}'"}]}}]}'
Expand Down

0 comments on commit 8f700f9

Please sign in to comment.