From 8f700f9fcd7949bc7580797726cf80ec712bb310 Mon Sep 17 00:00:00 2001 From: Caio Gomes Date: Sat, 29 Jun 2024 14:54:04 +0300 Subject: [PATCH] Adding debug echos in argocd bootstrap workflow --- .github/workflows/argo-cd-bootstrap.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/argo-cd-bootstrap.yaml b/.github/workflows/argo-cd-bootstrap.yaml index 3afb219..04aae6d 100644 --- a/.github/workflows/argo-cd-bootstrap.yaml +++ b/.github/workflows/argo-cd-bootstrap.yaml @@ -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}'"}]}}]}'