From f6e38b4e6f58308bf2b94f136b04775a6d4d5c60 Mon Sep 17 00:00:00 2001 From: Sylvain Ard Date: Sat, 6 Jul 2024 18:40:45 +0200 Subject: [PATCH] correction de main.tf --- .github/workflows/deploy.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c490561..48d377d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -58,8 +58,9 @@ jobs: INSTANCE_IDS=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=backend-instance-*" --query "Reservations[*].Instances[*].InstanceId" --output text) echo "Instance IDs: $INSTANCE_IDS" for INSTANCE_ID in $INSTANCE_IDS; do + echo "Checking instance $INSTANCE_ID" PUBLIC_IP=$(aws ec2 describe-instances --instance-ids $INSTANCE_ID --query "Reservations[*].Instances[*].PublicIpAddress" --output text) - echo "Connecting to $PUBLIC_IP" + echo "Public IP for instance $INSTANCE_ID: $PUBLIC_IP" if [ -z "$PUBLIC_IP" ]; then echo "No public IP found for instance $INSTANCE_ID" exit 1