amazon-ecs-deploy-task-definition
amazon-ecs-deploy-task-definition copied to clipboard
Unmasking the URL of ALB
I have my react application running on ECS which is connected to ALB for the unique URL. Now whenever my code changes are pushed to GitHub, I run a particular CI/CD pipeline that updates my ECR for fetching the latest docker image and that triggers my ECS which generates tasks. Ultimately see the below deploy.yaml file code to get the URL but it comes with masking (***) which I want to remove.
- name: Retrieve ALB DNS Name
id: get-alb-dns
run: |
TARGET_GROUP_ARN=$(aws ecs describe-services --cluster transfer-chain-cluster --services transfer-file-service --query "services[0].loadBalancers[0].targetGroupArn" --output text --region ${{ env.AWS_REGION }})
ALB_ARN=$(aws elbv2 describe-target-groups --target-group-arns $TARGET_GROUP_ARN --query "TargetGroups[0].LoadBalancerArns[0]" --output text --region ${{ env.AWS_REGION }})
ALB_DNS=$(aws elbv2 describe-load-balancers --load-balancer-arns $ALB_ARN --query "LoadBalancers[0].DNSName" --output text --region ${{ env.AWS_REGION }})
echo "ALB_DNS=${ALB_DNS}" >> $GITHUB_ENV
- name: Output ALB DNS Name
run: |
echo "Application URL: http://${{ env.ALB_DNS }}"
Now assume that the application URL is as follows: my-app-1234567890.us-east-1.elb.amazonaws.com but it shows me my-app-1234567890.***.elb.amazonaws.com so how to unmask the URL generated by GitHub YAML workflow?
I know it is the issue of secrets but how to solve that?